コード例 #1
0
 /**
  * Object constructor
  *
  * @param array $options Options to set as $this->key
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (!isset($this->user)) {
         $this->user = Session::getUser();
     }
 }
コード例 #2
0
 /**
  * Object constructor
  *
  * @param [array] $options Options to set as $this->key
  * @return [TerminusModel] $this
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     if (!isset($this->user)) {
         $this->user = new User(new stdClass(), array());
     }
 }
コード例 #3
0
 /**
  * Instantiates the collection, sets param members as properties
  *
  * @param [array] $options To be set to $this->key
  * @return [TerminusCollection] $this
  */
 public function __construct($options = array())
 {
     parent::__construct($options);
     $this->user = new User();
     $this->workflows = new Workflows(array('owner' => $this, 'owner_type' => 'organization'));
 }
コード例 #4
0
ファイル: Sites.php プロジェクト: serundeputy/cli
 /**
  * Instantiates the collection, sets param members as properties
  *
  * @param array $options To be set to $this->key
  * @return Sites
  */
 public function __construct(array $options = array())
 {
     parent::__construct($options);
     $this->sites_cache = new SitesCache();
     $this->user = Session::getUser();
 }