| 1 | <?php |
||
| 8 | class ResponseBag |
||
| 9 | { |
||
| 10 | |||
| 11 | const AUTOMATIC = 0; |
||
| 12 | const SINGLE_OBJECT = 1; |
||
| 13 | const ARRAY = 2; |
||
| 14 | |||
| 15 | protected $collection = []; |
||
| 16 | protected $serializationRule = ResponseBag::AUTOMATIC; |
||
| 17 | |||
| 18 | public function add($object) |
||
| 37 | |||
| 38 | /** |
||
| 39 | * @return array |
||
| 40 | */ |
||
| 41 | public function process() |
||
| 51 | |||
| 52 | public function getCollection() |
||
| 56 | |||
| 57 | public function serializationRule($value) |
||
| 61 | } |
||
| 62 |