Пример #1
0
 /**
  * Constructor method for CheckRight
  * @param Target $target The target
  * @param Grantee $grantee The grantee
  * @param string $right Checked right
  * @param array  $attrs Attributes
  * @return self
  */
 public function __construct(Target $target, Grantee $grantee, $right, array $attrs = [])
 {
     parent::__construct($attrs);
     $this->setChild('target', $target);
     $this->setChild('grantee', $grantee);
     $this->setChild('right', trim($right));
 }
 /**
  * Constructor method for UpdatePresenceSessionId
  * @param UcService $ucservice The UC service
  * @param string $username App username
  * @param string $password App password
  * @param array  $attrs
  * @return self
  */
 public function __construct(UcService $ucservice, $username, $password, array $attrs = [])
 {
     parent::__construct($attrs);
     $this->setChild('ucservice', $ucservice);
     $this->setChild('username', trim($username));
     $this->setChild('password', trim($password));
 }
Пример #3
0
 /**
  * Constructor method for CheckGalConfig
  *
  * @param Query  $query The query
  * @param Action $action The action. Can be autocomplete|search|sync. Default is search
  * @param array  $attrs The attributes
  * @return self
  */
 public function __construct(Query $query = null, Action $action = null, array $attrs = [])
 {
     parent::__construct($attrs);
     if ($query instanceof Query) {
         $this->setChild('query', $query);
     }
     if ($action instanceof Action) {
         $this->setChild('action', $action);
     }
 }
 /**
  * Constructor method for AddGalSyncDataSource
  * @param string $name
  * @param string $domain
  * @param GalMode $type
  * @param string $folder
  * @param Account $account
  * @return self
  */
 public function __construct(Account $account, $name, $domain, GalMode $type, $folder = null, array $attrs = [])
 {
     parent::__construct($attrs);
     $this->setChild('account', $account);
     $this->setProperty('name', trim($name));
     $this->setProperty('domain', trim($domain));
     $this->setProperty('type', $type);
     if (null !== $folder) {
         $this->setProperty('folder', trim($folder));
     }
 }
Пример #5
0
 /**
  * Constructor method for GetDistributionList
  * @param  DistributionList $dl Distribution List
  * @param  int $limit The maximum number of dls to return (0 is default and means all)
  * @param  int $offset The starting offset (0, 25 etc)
  * @param  bool $sortAscending Flag whether to sort in ascending order 1 (true) is the default
  * @param  array $attrs
  * @return self
  */
 public function __construct(DistList $dl = null, $limit = null, $offset = null, $sortAscending = null, array $attrs = [])
 {
     parent::__construct($attrs);
     if ($dl instanceof DistList) {
         $this->setChild('dl', $dl);
     }
     if (null !== $limit) {
         $this->setProperty('limit', (int) $limit);
     }
     if (null !== $offset) {
         $this->setProperty('offset', (int) $offset);
     }
     if (null !== $sortAscending) {
         $this->setProperty('sortAscending', (bool) $sortAscending);
     }
 }
Пример #6
0
 /**
  * Constructor method for DeleteDataSource
  * @param  string $id Id for an existing Account
  * @param  Id     $dataSource Data source ID
  * @param  array  $attrs
  * @return self
  */
 public function __construct($id, Id $dataSource, array $attrs = [])
 {
     parent::__construct($attrs);
     $this->setProperty('id', trim($id));
     $this->setChild('dataSource', $dataSource);
 }