public function __construct($attributes = null, array $options = []) { if (is_object($attributes)) { $this->attributes = $this->parseAttributes($attributes); if (isset($this->attributes->id)) { $this->id = $this->attributes->id; } } else { $this->attributes = (object) []; } }
/** * @inheritdoc */ public function __construct($attributes = null, array $options = []) { parent::__construct($attributes, $options); $this->organization = $options['collection']->organization; $this->site_data = $attributes->site; $this->tags_data = $attributes->tags; }