/** * Adds a model to this collection * * @param [stdClass] $model_data Data to feed into attributes of new model * @param [array] $options Data to make properties of the new model * @return [void] */ protected function add($model_data, $options = array()) { parent::add($model_data->attributes, $options); }
/** * Adds a model to this collection * * @param [stdClass] $model_data Data to feed into attributes of new model * @param [array] $options Data to make properties of the new model * @return [mixed] $model newly added model */ protected function add($model_data, $options = array()) { $model = parent::add($model_data, $options = array()); $model->owner = $this->owner; return $model; }
/** * Adds a model to this collection * * @param object $model_data Data to feed into attributes of new model * @param array $options Data to make properties of the new model * @return void */ public function add($model_data, array $options = array()) { parent::add($model_data->attributes, $options); }
/** * Adds a model to this collection * * @param object $model_data Data to feed into attributes of new model * @param array $options Data to make properties of the new model * @return Workflow The newly-added model */ public function add($model_data, array $options = array()) { $model = parent::add($model_data, $options); $model->owner = $this->owner; return $model; }