12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 10/1/16
- * Time: 5:52 PM
- */
-
- namespace App\Dbo;
-
- use Luticate\Utils\Dbo\LuDbo;
- use Luticate\Utils\Dbo\LuDboDeserializeException;
-
- class StopsLiteRoutesLiteDboArray extends LuDbo
- {
- /**
- * @var StopsLiteRoutesLiteDbo[]
- */
- protected $_array;
- public function getArray()
- {
- return $this->_array;
- }
- public function setArray($value)
- {
- $this->_array = $value;
- }
-
- public function jsonSerialize()
- {
- return $this->_array;
- }
-
- public static function jsonDeserialize($json)
- {
- if (!is_array($json)) {
- throw new LuDboDeserializeException("Invalid array value");
- }
- $dbo = new self();
- $array = [];
- foreach ($json as $data) {
- $array[] = StopsLiteRoutesLiteDbo::jsonDeserialize($data);
- }
- $dbo->setArray($array);
- return $dbo;
- }
-
- public static function generateSample()
- {
- return [
- StopsLiteRoutesLiteDbo::generateSample(),
- StopsLiteRoutesLiteDbo::generateSample()
- ];
- }
- }
|