Overview

Namespaces

  • Apptus
    • ESales
      • Connector
        • Report
        • Time
    • Util
      • Cache
  • PHP
  • Overview
  • Namespace
  • Class
  • Tree
 1:  2:  3:  4:  5:  6:  7:  8:  9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: 38: 39: 40: 41: 42: 43: 44: 45: 46: 47: 48: 49: 50: 51: 52: 53: 54: 55: 56: 57: 58: 59: 60: 61: 62: 63: 64: 65: 66: 67: 68: 69: 70: 71: 72: 73: 74: 75: 76: 77: 78: 79: 80: 
<?php
namespace Apptus\ESales\Connector\Report;

/**
 * Class holding data for rank, count conversion rate and impact for a phrase.
 *
 * This class represents 1 row in the bottom 2 tables in the Search Statistics tab on the Reports page in eSales manager.
 */
class SearchConversion {
    private $phrase;
    private $count;
    private $conversionRate;
    private $impact;
    private $rank;

    /**
     * @param string
     *            The search phrase. Can not be null.
     * @param int
     *            Number of time this phrase was searched on.
     * @param Rate
     *            Ratio between number of purchases and number of searches on this phrase. Can not be null.
     * @param Rate
     *            How this phrase affects the total conversion rate of the site. Can not be null.
     * @param int
     *            The popularity position for this search phrase in the table.
     * @throws \InvalidArgumentException
     */
    public function __construct($phrase, $count, Rate $conversionRate, Rate $impact, $rank) {
        if ($phrase === null) {
            throw new \InvalidArgumentException('The phrase can not be null.');
        }
        $this->phrase = $phrase;
        $this->count = $count;
        $this->conversionRate = $conversionRate;
        $this->impact = $impact;
        $this->rank = $rank;
    }

    /**
     * @return string
     *            The search phrase.
     */
    public function phrase() {
        return $this->phrase;
    }

    /**
     * @return int
     *            Number of time this phrase was searched on.
     */
    public function count() {
        return $this->count;
    }

    /**
     * @return Rate
     *            Ratio between number of purchases and number of searches on this phrase.
     */
    public function conversionRate() {
        return $this->conversionRate;
    }

    /**
     * @return Rate
     *            How this phrase affects the total conversion rate of the site.
     */
    public function impact() {
        return $this->impact;
    }

    /**
     * @return int
     *            The position for this search phrase in the table, based on impact.
     */
    public function rank() {
        return $this->rank;
    }
}
Apptus ESales Connector PHP API documentation generated by ApiGen