| 1 | <?php |
||
| 7 | class AttrGet implements JsonSerializable |
||
| 8 | { |
||
| 9 | /** |
||
| 10 | * The attribute name |
||
| 11 | * |
||
| 12 | * @var string |
||
| 13 | */ |
||
| 14 | private $sAttrName; |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The constructor. |
||
| 18 | * |
||
| 19 | * @param string $sAttrName The attribute name |
||
| 20 | */ |
||
| 21 | public function __construct($sAttrName) |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Returns a string representation of the script output (javascript) from this call |
||
| 28 | * |
||
| 29 | * @return string |
||
| 30 | */ |
||
| 31 | public function getScript() |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Convert this call to string |
||
| 38 | * |
||
| 39 | * @return string |
||
| 40 | */ |
||
| 41 | public function __toString() |
||
| 45 | |||
| 46 | /** |
||
| 47 | * Convert this call to string, when converting the response into json. |
||
| 48 | * |
||
| 49 | * This is a method of the JsonSerializable interface. |
||
| 50 | * |
||
| 51 | * @return string |
||
| 52 | */ |
||
| 53 | public function jsonSerialize() |
||
| 57 | } |
||
| 58 |