Beispiel #1
0
 /**
  * Constructor
  *
  * @param $data     All data of this item received from api.
  */
 public function __construct($data)
 {
     if ($data->comments->count > 0) {
         foreach ($data->comments->data as $comment_data) {
             $this->_comments[] = new Comment($comment_data);
         }
     }
     parent::__construct($data);
 }
 /**
  * @param string|null $label
  * @param string|null $uri
  */
 public function __construct($label = null, $uri = null)
 {
     parent::__construct();
     if (null !== $label) {
         $this->label = $label;
     }
     if (null !== $uri) {
         $this->uri = $uri;
     }
 }
 public function __construct($key, $label, $url, $icon = null, $permission = null, AbstractMenuList $children = null)
 {
     parent::__construct($key, $label, $url, $icon, $permission, $children);
 }
Beispiel #4
0
 /**
  * @param array|string $idOrData
  */
 public function __construct($idOrData)
 {
     $idOrData = is_string($idOrData) ? ['id' => $idOrData] : $idOrData;
     $idOrData = array_merge(['id' => uniqid('B'), 'name' => '', 'itemsAmount' => 0, 'totalPrice' => 0], $idOrData);
     parent::__construct(static::_parse($idOrData), \ArrayObject::ARRAY_AS_PROPS, 'ArrayIterator');
 }
Beispiel #5
0
 public function __construct($cost, $damage, $armor)
 {
     parent::__construct($cost, $damage, $armor);
 }