| 1 | <?php |
||
| 14 | abstract class SingleParameter implements SingleParameterInterface |
||
| 15 | { |
||
| 16 | use Indexable; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Name for a parameter in GA Measurement Protocol. |
||
| 20 | * Its sent as the name for a query parameter in the HTTP request. |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $name = ''; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Value for the parameter. |
||
| 28 | * |
||
| 29 | * @var mixed |
||
| 30 | */ |
||
| 31 | protected $value; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Indexes the name when necessary. |
||
| 35 | * |
||
| 36 | * @param $index |
||
| 37 | */ |
||
| 38 | public function __construct($index = '') |
||
| 42 | |||
| 43 | /** |
||
| 44 | * @inheritDoc |
||
| 45 | */ |
||
| 46 | public function getName() |
||
| 50 | |||
| 51 | /** |
||
| 52 | * @inheritDoc |
||
| 53 | */ |
||
| 54 | public function setValue($value) |
||
| 60 | |||
| 61 | /** |
||
| 62 | * @inheritDoc |
||
| 63 | */ |
||
| 64 | public function getValue() |
||
| 68 | } |
||
| 69 |