コード例 #1
0
ファイル: Upstreams.php プロジェクト: rvtraveller/terminus
 /**
  * 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);
 }
コード例 #2
0
ファイル: Workflows.php プロジェクト: Zacker/cli
 /**
  * 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;
 }
コード例 #3
0
ファイル: Upstreams.php プロジェクト: serundeputy/cli
 /**
  * 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);
 }
コード例 #4
0
ファイル: Workflows.php プロジェクト: serundeputy/cli
 /**
  * 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;
 }