Example #1
0
 /**
  * Constructor method for authRequest
  * @param  Account   $account Specifies the account to authenticate against
  * @param  string    $password Password to use in conjunction with an account
  * @param  PreAuth   $preauth The preauth
  * @param  AuthToken $authToken An authToken can be passed instead of account/password/preauth to validate an existing auth token.
  * @param  string    $virtualHost If specified (in conjunction with by="name"), virtual-host is used to determine the domain of the account name, if it does not include a domain component.
  * @param  AuthPrefs $prefs Preference
  * @param  AuthAttrs $attrs The attributes
  * @param  string    $requestedSkin The requestedSkin. If specified the name of the skin requested by the client.
  * @param  bool      $persistAuthTokenCookie Controls whether the auth token cookie in the response should be persisted when the browser exits.
  * @return self
  */
 public function __construct(Account $account = null, $password = null, PreAuth $preauth = null, AuthToken $authToken = null, $virtualHost = null, AuthPrefs $prefs = null, AuthAttrs $attrs = null, $requestedSkin = null, $persistAuthTokenCookie = null)
 {
     parent::__construct();
     if ($account instanceof Account) {
         $this->setChild('account', $account);
     }
     if (null !== $password) {
         $this->setChild('password', trim($password));
     }
     if ($preauth instanceof PreAuth) {
         $this->setChild('preauth', $preauth);
     }
     if ($authToken instanceof AuthToken) {
         $this->setChild('authToken', $authToken);
     }
     if (null !== $virtualHost) {
         $this->setChild('virtualHost', trim($virtualHost));
     }
     if ($prefs instanceof AuthPrefs) {
         $this->setChild('prefs', $prefs);
     } else {
         $this->setChild('prefs', new AuthPrefs());
     }
     if ($attrs instanceof AuthAttrs) {
         $this->setChild('attrs', $attrs);
     } else {
         $this->setChild('attrs', new AuthAttrs());
     }
     if (null !== $requestedSkin) {
         $this->setChild('requestedSkin', trim($requestedSkin));
     }
     if (null !== $persistAuthTokenCookie) {
         $this->setProperty('persistAuthTokenCookie', (bool) $persistAuthTokenCookie);
     }
 }
Example #2
0
 /**
  * Constructor method for DiscoverRights
  * @param  array $rights
  * @return self
  */
 public function __construct(array $rights)
 {
     parent::__construct();
     $this->setRights($rights);
     $this->on('before', function (Base $sender) {
         $sender->setChild('right', $sender->getRights()->all());
     });
 }
Example #3
0
 /**
  * Constructor method for CheckRights
  * @param array $targets
  * @return self
  */
 public function __construct(array $targets)
 {
     parent::__construct();
     $this->setTargets($targets);
     $this->on('before', function (Base $sender) {
         if ($sender->getTargets()->count()) {
             $sender->setChild('target', $sender->getTargets()->all());
         }
     });
 }
Example #4
0
 /**
  * Constructor method for changePassword
  * @param  Account $account Details of the account
  * @param  string  $oldPassword Old password
  * @param  string  $password New Password to assign
  * @param  string  $virtualHost If specified virtual-host is used to determine the domain of the account name, if it does not include a domain component.
  * @return self
  */
 public function __construct(Account $account, $oldPassword, $password, $virtualHost = null)
 {
     parent::__construct();
     $this->setChild('account', $account);
     $this->setChild('oldPassword', trim($oldPassword));
     $this->setChild('password', trim($password));
     if (null !== $virtualHost) {
         $this->setChild('virtualHost', trim($virtualHost));
     }
 }
Example #5
0
 /**
  * Constructor method for GetInfo
  * @param string $sections Comma separated list of sections to return information about. Sections are: mbox,prefs,attrs,zimlets,props,idents,sigs,dsrcs,children
  * @param string $rights Comma separated list of rights to return information about.
  * @return self
  */
 public function __construct($sections = null, $rights = null)
 {
     parent::__construct();
     if (null !== $sections) {
         $this->setSections($sections);
     }
     if (null !== $rights) {
         $this->setProperty('rights', trim($rights));
     }
 }
Example #6
0
 /**
  * Constructor method for GetPrefs
  * @param array $prefs Any of these are specified then only get these preferences
  * @return self
  */
 public function __construct(array $prefs = [])
 {
     parent::__construct();
     $this->setPrefs($prefs);
     $this->on('before', function (Base $sender) {
         if ($sender->getPrefs()->count()) {
             $sender->setChild('pref', $sender->getPrefs()->all());
         }
     });
 }
Example #7
0
 /**
  * Constructor method for authRequest
  * @param  Account   $account Specifies the account to authenticate against
  * @param  string    $password Password to use in conjunction with an account
  * @param  PreAuth   $preauth The preauth
  * @param  AuthToken $authToken An authToken can be passed instead of account/password/preauth to validate an existing auth token.
  * @param  string    $virtualHost If specified (in conjunction with by="name"), virtual-host is used to determine the domain of the account name, if it does not include a domain component.
  * @param  AuthPrefs $prefs Preference
  * @param  AuthAttrs $attrs The attributes
  * @param  string    $requestedSkin The requestedSkin. If specified the name of the skin requested by the client.
  * @param  string    $twoFactorCode The TOTP code used for two-factor authentication
  * @param  string    $trustedDeviceToken Whether the client represents a trusted device
  * @param  string    $deviceId Unique device identifier; used to verify trusted mobile devices
  * @param  bool      $persistAuthTokenCookie Controls whether the auth token cookie in the response should be persisted when the browser exits.
  * @param  bool      $csrfTokenSecured Controls whether the client supports CSRF token.
  * @param  bool      $deviceTrusted Whether the client represents a trusted device
  * @param  bool      $generateDeviceId
  * @return self
  */
 public function __construct(Account $account = null, $password = null, PreAuth $preauth = null, AuthToken $authToken = null, $virtualHost = null, AuthPrefs $prefs = null, AuthAttrs $attrs = null, $requestedSkin = null, $twoFactorCode = null, $trustedDeviceToken = null, $deviceId = null, $persistAuthTokenCookie = null, $csrfTokenSecured = null, $deviceTrusted = null, $generateDeviceId = null)
 {
     parent::__construct();
     if ($account instanceof Account) {
         $this->setChild('account', $account);
     }
     if (null !== $password) {
         $this->setChild('password', trim($password));
     }
     if ($preauth instanceof PreAuth) {
         $this->setChild('preauth', $preauth);
     }
     if ($authToken instanceof AuthToken) {
         $this->setChild('authToken', $authToken);
     }
     if (null !== $virtualHost) {
         $this->setChild('virtualHost', trim($virtualHost));
     }
     if ($prefs instanceof AuthPrefs) {
         $this->setChild('prefs', $prefs);
     } else {
         $this->setChild('prefs', new AuthPrefs());
     }
     if ($attrs instanceof AuthAttrs) {
         $this->setChild('attrs', $attrs);
     } else {
         $this->setChild('attrs', new AuthAttrs());
     }
     if (null !== $requestedSkin) {
         $this->setChild('requestedSkin', trim($requestedSkin));
     }
     if (null !== $twoFactorCode) {
         $this->setChild('twoFactorCode', trim($twoFactorCode));
     }
     if (null !== $trustedDeviceToken) {
         $this->setChild('trustedToken', trim($trustedDeviceToken));
     }
     if (null !== $deviceId) {
         $this->setChild('deviceId', trim($deviceId));
     }
     if (null !== $persistAuthTokenCookie) {
         $this->setProperty('persistAuthTokenCookie', (bool) $persistAuthTokenCookie);
     }
     if (null !== $csrfTokenSecured) {
         $this->setProperty('csrfTokenSecured', (bool) $csrfTokenSecured);
     }
     if (null !== $deviceTrusted) {
         $this->setProperty('deviceTrusted', (bool) $deviceTrusted);
     }
     if (null !== $generateDeviceId) {
         $this->setProperty('generateDeviceId', (bool) $generateDeviceId);
     }
 }
 /**
  * Constructor method for DistributionListAction
  * @param  DistList $dl Identifies the distribution list to act upon
  * @param  Action $action Specifies the action to perform
  * @param  array $attrs Attributes
  * @return self
  */
 public function __construct(DistList $dl, Action $action, array $attrs = [])
 {
     parent::__construct();
     $this->setChild('dl', $dl);
     $this->setChild('action', $action);
     $this->setAttrs($attrs);
     $this->on('before', function (Base $sender) {
         if ($sender->getAttrs()->count()) {
             $sender->setChild('a', $sender->getAttrs()->all());
         }
     });
 }
 /**
  * Constructor method for ModifyWhiteBlackList
  * @param WhiteList $whiteList
  * @param BlackList $blackList
  * @return self
  */
 public function __construct(WhiteList $whiteList = null, BlackList $blackList = null)
 {
     parent::__construct();
     if ($whiteList instanceof WhiteList) {
         $this->setChild('whiteList', $whiteList);
     } else {
         $this->setChild('whiteList', new WhiteList());
     }
     if ($blackList instanceof BlackList) {
         $this->setChild('blackList', $blackList);
     } else {
         $this->setChild('blackList', new BlackList());
     }
 }
Example #10
0
 /**
  * Constructor method for searchGal
  * @param string $locale Client locale identification.
  * @param CursorInfo $cursor Cursor specification
  * @param EntrySearchFilterInfo $searchFilter Search filter specification
  * @param string $ref The ref. If set then search GAL by this ref, which is a dn. If specified then "name" attribute is ignored.
  * @param string $name Query string. Note: ignored if {gal-search-ref-DN} is specified
  * @param SearchType $type Type of addresses to auto-complete on
  * @param bool   $needExp Flag whether the {exp} flag is needed in the response for group entries. Default is unset.
  * @param bool   $needIsOwner The needIsOwner. Set this if the "isOwner" flag is needed in the response for group entries. Default is unset.
  * @param MemberOf $needIsMember Specify if the "isMember" flag is needed in the response for group entries.
  * @param bool   $needSMIMECerts Internal attr, for proxied GSA search from GetSMIMEPublicCerts only
  * @param string $galAcctId GAL Account ID
  * @param bool   $quick "Quick" flag. 
  * @param SortBy $sortBy SortBy setting. Default value is "dateDesc"
  * @param int    $limit The maximum number of results to return. It defaults to 10 if not specified, and is
  * @param int    $offset Specifies the 0-based offset into the results list to return as the first result for this search operation.
  * @return self
  */
 public function __construct($locale = null, CursorInfo $cursor = null, SearchFilter $searchFilter = null, $ref = null, $name = null, SearchType $type = null, $needExp = null, $needIsOwner = null, MemberOf $needIsMember = null, $needSMIMECerts = null, $galAcctId = null, $quick = null, SortBy $sortBy = null, $limit = null, $offset = null)
 {
     parent::__construct();
     if (null !== $locale) {
         $this->setChild('locale', trim($locale));
     }
     if ($cursor instanceof CursorInfo) {
         $this->setChild('cursor', $cursor);
     }
     if ($searchFilter instanceof SearchFilter) {
         $this->setChild('searchFilter', $searchFilter);
     }
     if (null !== $ref) {
         $this->setProperty('ref', trim($ref));
     }
     if (null !== $name) {
         $this->setProperty('name', trim($name));
     }
     if ($type instanceof SearchType) {
         $this->setProperty('type', $type);
     }
     if (null !== $needExp) {
         $this->setProperty('needExp', (bool) $needExp);
     }
     if (null !== $needIsOwner) {
         $this->setProperty('needIsOwner', (bool) $needIsOwner);
     }
     if ($needIsMember instanceof MemberOf) {
         $this->setProperty('needIsMember', $needIsMember);
     }
     if (null !== $needSMIMECerts) {
         $this->setProperty('needSMIMECerts', (bool) $needSMIMECerts);
     }
     if (null !== $galAcctId) {
         $this->setProperty('galAcctId', trim($galAcctId));
     }
     if (null !== $quick) {
         $this->setProperty('quick', (bool) $quick);
     }
     if ($sortBy instanceof SortBy) {
         $this->setProperty('sortBy', $sortBy);
     }
     if (null !== $limit) {
         $this->setProperty('limit', (int) $limit);
     }
     if (null !== $offset) {
         $this->setProperty('offset', (int) $offset);
     }
 }
Example #11
0
 /**
  * Constructor method for GetShareInfo
  * @param Grantee $grantee Filter by the specified grantee type
  * @param Account $owner Specifies the owner of the share
  * @param bool $internal Flags that have been proxied to this server because the specified "owner account" is homed here. Do not proxy in this case.
  * @param bool $includeSelf Flag whether own shares should be included
  * @return self
  */
 public function __construct(Grantee $grantee = null, Account $owner = null, $internal = null, $includeSelf = null)
 {
     parent::__construct();
     if ($grantee instanceof Grantee) {
         $this->setChild('grantee', $grantee);
     }
     if ($owner instanceof Account) {
         $this->setChild('owner', $owner);
     }
     if (null !== $internal) {
         $this->setProperty('internal', (bool) $internal);
     }
     if (null !== $includeSelf) {
         $this->setProperty('includeSelf', (bool) $includeSelf);
     }
 }
 /**
  * Constructor method for EnableTwoFactorAuth
  * @param  string    $name  The name of the account for which to enable two-factor auth
  * @param  string    $password  Password to use in conjunction with an account
  * @param  AuthToken $authToken  Auth token issued during the first 2FA enablement step.
  * @param  bool      $csrfSupported  Whether the client supports the CSRF token.
  * @return self
  */
 public function __construct($name, $password = null, AuthToken $authToken = null, $twoFactorCode = null, $csrfSupported = null)
 {
     parent::__construct();
     $this->setChild('name', trim($name));
     if (null !== $password) {
         $this->setChild('password', trim($password));
     }
     if ($authToken instanceof AuthToken) {
         $this->setChild('authToken', $authToken);
     }
     if (null !== $twoFactorCode) {
         $this->setChild('twoFactorCode', trim($twoFactorCode));
     }
     if (null !== $csrfSupported) {
         $this->setProperty('csrfTokenSecured', (bool) $csrfSupported);
     }
 }
Example #13
0
 /**
  * Constructor method for AutoCompleteGal
  * @param  string $name The name to test for autocompletion
  * @param  bool   $needExp Flag whether the {exp} flag is needed in the response for group entries.
  * @param  string $type Type of addresses to auto-complete on
  * @param  string $galAcctId GAL Account ID
  * @param  int    $limit An integer specifying the maximum number of results to return
  * @return self
  */
 public function __construct($name, $needExp = null, SearchType $type = null, $galAcctId = null, $limit = null)
 {
     parent::__construct();
     if (null !== $needExp) {
         $this->setProperty('needExp', (bool) $needExp);
     }
     $this->setProperty('name', trim($name));
     if ($type instanceof SearchType) {
         $this->setProperty('type', $type);
     }
     if (null !== $galAcctId) {
         $this->setProperty('galAcctId', trim($galAcctId));
     }
     if (null !== $limit) {
         $this->setProperty('limit', (int) $limit);
     }
 }
 /**
  * Constructor method for GetAccountDistributionLists
  * @param  bool $ownerOf The ownerOf
  * @param  MemberOf $memberOf The memberOf
  * @param  array $attrs The attributes
  * @return self
  */
 public function __construct($ownerOf = null, MemberOf $memberOf = null, array $attrs = [])
 {
     parent::__construct();
     if (null !== $ownerOf) {
         $this->setProperty('ownerOf', (bool) $ownerOf);
     }
     if ($memberOf instanceof MemberOf) {
         $this->setProperty('memberOf', $memberOf);
     }
     $this->setAttrs($attrs);
     $this->on('before', function (Base $sender) {
         $attrs = $sender->getAttrs();
         if (!empty($attrs)) {
             $sender->setProperty('attrs', $attrs);
         }
     });
 }
 /**
  * Constructor method for getDistributionList
  * @param  DistList $dl Specify the distribution list
  * @param  bool     $needOwners Whether to return owners, default is 0 (i.e. Don't return owners)
  * @param  string   $needRights return grants for the specified (comma-seperated) rights. e.g. needRights="sendToDistList,viewDistList"
  * @param  array    $attrs Attributes
  * @return self
  */
 public function __construct(DistList $dl, $needOwners = null, $needRights = null, array $attrs = [])
 {
     parent::__construct();
     $this->setChild('dl', $dl);
     if (null !== $needOwners) {
         $this->setProperty('needOwners', (bool) $needOwners);
     }
     if (null !== $needRights) {
         $this->setProperty('needRights', trim($needRights));
     }
     $this->setAttrs($attrs);
     $this->on('before', function (Base $sender) {
         if ($sender->getAttrs()->count()) {
             $sender->setChild('a', $sender->getAttrs()->all());
         }
     });
 }
 /**
  * Constructor method for searchCalendarResources
  * @param string $locale Client locale identification.
  * @param CursorInfo $cursor Cursor specification
  * @param string $name If specified, passed through to the GAL search as the search key
  * @param EntrySearchFilterInfo $searchFilter Search filter specification
  * @param bool $quick "Quick" flag.
  * @param string $sortBy Name of attribute to sort on. default is the calendar resource name.
  * @param int $limit An integer specifying the 0-based offset into the results list to return as the first result for this search operation
  * @param int $offset The 0-based offset into the results list to return as the first result for this search operation.
  * @param string $galAcctId GAL Account ID
  * @param string $attrs Comma separated list of attributes
  * @return self
  */
 public function __construct($locale = null, CursorInfo $cursor = null, $name = null, SearchFilter $searchFilter = null, $quick = null, $sortBy = null, $limit = null, $offset = null, $galAcctId = null, array $attrs = [])
 {
     parent::__construct();
     if (null !== $locale) {
         $this->setChild('locale', trim($locale));
     }
     if ($cursor instanceof CursorInfo) {
         $this->setChild('cursor', $cursor);
     }
     if (null !== $name) {
         $this->setChild('name', trim($name));
     }
     if ($searchFilter instanceof SearchFilter) {
         $this->setChild('searchFilter', $searchFilter);
     }
     if (null !== $quick) {
         $this->setProperty('quick', (bool) $quick);
     }
     if (null !== $sortBy) {
         $this->setProperty('sortBy', trim($sortBy));
     }
     if (null !== $limit) {
         $this->setProperty('limit', (int) $limit);
     }
     if (null !== $offset) {
         $this->setProperty('offset', (int) $offset);
     }
     if (null !== $galAcctId) {
         $this->setProperty('galAcctId', trim($galAcctId));
     }
     $this->setAttrs($attrs);
     $this->on('before', function (Base $sender) {
         $attrs = $sender->getAttrs();
         if (!empty($attrs)) {
             $sender->setProperty('attrs', $attrs);
         }
     });
 }
Example #17
0
 /**
  * Constructor method for GetAccountInfo
  * @param  Account $account Use to identify the account
  * @return self
  */
 public function __construct(Account $account)
 {
     parent::__construct();
     $this->setChild('account', $account);
 }
Example #18
0
 /**
  * Constructor method for DeleteIdentity
  * @param NameId $identity Details of the identity to delete.
  * @return self
  */
 public function __construct(NameId $identity)
 {
     parent::__construct();
     $this->setChild('identity', $identity);
 }
 /**
  * Constructor method for RegisterMobileGatewayApp
  * @param ZmgDeviceSpec $signature Zmg device specification
  * @return self
  */
 public function __construct(ZmgDeviceSpec $zmgDevice)
 {
     parent::__construct();
     $this->setChild('zmgDevice', $zmgDevice);
 }
 /**
  * Constructor method for subscribeDistributionList
  * @param SubscribeOp $op The operation to perform. 
  * @param DistList $dl Selector for the distribution list
  * @return self
  */
 public function __construct(SubscribeOp $op, DistList $dl)
 {
     parent::__construct();
     $this->setProperty('op', $op);
     $this->setChild('dl', $dl);
 }
Example #21
0
 /**
  * Constructor method for DeleteSignature
  * @param NameId $signature The signature to delete
  * @return self
  */
 public function __construct(NameId $signature)
 {
     parent::__construct();
     $this->setChild('signature', $signature);
 }