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:  81:  82:  83:  84:  85:  86:  87:  88:  89:  90:  91:  92:  93:  94:  95:  96:  97:  98:  99: 100: 101: 102: 103: 104: 105: 106: 107: 108: 109: 110: 111: 112: 113: 114: 115: 116: 117: 118: 119: 120: 121: 122: 123: 124: 125: 126: 127: 128: 129: 130: 131: 132: 133: 134: 135: 136: 137: 138: 139: 140: 141: 142: 143: 144: 145: 146: 147: 148: 149: 150: 151: 152: 153: 154: 155: 156: 157: 158: 159: 160: 161: 162: 163: 164: 165: 166: 167: 168: 169: 170: 171: 172: 173: 174: 175: 176: 177: 178: 179: 180: 181: 182: 183: 184: 185: 186: 187: 188: 189: 190: 191: 192: 193: 194: 195: 196: 197: 198: 199: 200: 201: 202: 203: 
<?php
namespace Apptus\ESales\Connector\Report;
use Apptus\ESales\Connector\Path;

/**
 * Sub class for PanelConversionReport.
 *
 * Contains performance information about a public panel path.
 */
class PanelConversionReportSection {
    private $displayName;
    private $panelType;
    private $path;
    private $display;
    private $click;
    private $addingToCart;
    private $payment;
    private $revenue;
    private $units;
    private $ctr;
    private $atr;
    private $ptr;

    /**
     * @param string $path
     *            The public path for this panel. Can not be null.
     * @param int $display
     *            Number of times this panel has been displayed.
     * @param int $click
     *            Number of times this panel has been clicked on.
     * @param int $addingToCart
     *            Number of items added to cart from this panel that were later purchased or abandoned.
     * @param int $payment
     *            Number of items added to cart from this panel and purchased later in the session.
     * @param Rate $ctr
     *            Clicks/displays or Rate::NaN() if the ctr can not be calculated. Can not be null.
     * @param Rate $atr
     *            Adding to carts/displays or Rate::NaN() if the atr can not be calculated. Can not be null.
     * @param Rate $ptr
     *            Payments/displays or Rate::NaN() if the ptr can not be calculated. Can not be null.
     * @param Rate $itr
     *            Clicks and Adding to carts/displays or Rate::NaN() if the itr can not be calculated. This parameter has been
     *            deprecated as of version 3.12 and will be ignored if supplied.
     * @param double $revenue
     *            The total revenue generated through this panel.
     * @param int $units
     *            The total number of sold units through this panel.
     */
    public function __construct($path, $display, $click, $addingToCart, $payment, Rate $ctr, Rate $atr, Rate $ptr,
                                Rate $itr = null, $revenue = 0.0, $units = 0, $displayName = null, $panelType = null) {
        $this->path = (string) $path;
        $this->display = $display;
        $this->click = $click;
        $this->addingToCart = $addingToCart;
        $this->payment = $payment;
        $this->ctr = $ctr;
        $this->atr = $atr;
        $this->ptr = $ptr;
        $this->units = $units;
        $this->revenue = $revenue;
        if ($displayName == null) {
            if ($path == null) {
                $this->displayName = null;
            } else {
                $this->displayName = Path::simpleName($path);
            }
        } else {
            $this->displayName = $displayName;
        }
        if ($panelType == null) {
            $this->panelType = PanelConversionReport::UNKNOWN_PANEL_TYPE;
        } else {
            $this->panelType = $panelType;
        }
    }

    /**
     *
     * @return string
     *            The display name of the panel.
     */
    public function displayName() {
        return $this->displayName;
    }

    /**
     *
     * @return string
     *            The type of the panel.
     */
    public function panelType() {
            return $this->panelType;
    }

    /**
     * @return string
     *            The public panel path
     */
    public function path() {
        return $this->path;
    }

    /**
     * @return int
     *            The number of times this panel has been displayed.
     */
    public function display() {
        return $this->display;
    }

    /**
     * @return int
     *            The number of times this panel or any content of this panel has been clicked on.
     */
    public function click() {
        return $this->click;
    }

    /**
     * @return int
     *            Number of items added to cart from this panel that were later purchased or abandoned.
     */
    public function addingToCart() {
        return $this->addingToCart;
    }

    /**
     * @return int
     *            Number of items added to cart from this panel and purchased later in the session.
     */
    public function payment() {
        return $this->payment;
    }

    /**
     * @return double
     *              The total revenue generated through this panel.
     */
    public function revenue() {
        return $this->revenue;
    }

    /**
     * @return int
     *              The total number of units purchased through this panel.
     */
    public function units() {
        return $this->units;
    }

    /**
     * @return Rate
     *             Clicks/displays or Rate::NaN() if the ctr can not be calculated.
     */
    public function ctr() {
        return $this->ctr;
    }

    /**
     * @return Rate
     *            Adding to carts/displays or Rate::NaN() if the atr can not be calculated.
     */
    public function atr() {
        return $this->atr;
    }

    /**
     * @return Rate
     *            Payments/displays or Rate::NaN() if the ctr can not be calculated.
     */
    public function ptr() {
        return $this->ptr;
    }

    /**
     *
     * @return Rate
     *            Clicks and Adding to carts/displays or Rate::NaN() if the ctr can not be calculated.
     * @deprecated
     *            As of 3.12, use ctr() instead.
     */
    public function itr() {
        return $this->ctr;
    }

    public function __toString() {
        return 'Section{' .
        'displayName=' . $this->displayName .
        ', panelType=' . $this->panelType .
        ', path=' . $this->path .
        ', display=' . $this->display .
        ', click=' . $this->click .
        ', addingToCart=' . $this->addingToCart .
        ', payment=' . $this->payment .
        ', revenue=' . $this->revenue .
        ', units=' . $this->units .
        ', ctr=' . $this->ctr .
        ', atr=' . $this->atr .
        ', ptr=' . $this->ptr .
        '}';
    }
}
Apptus ESales Connector PHP API documentation generated by ApiGen