Esempio n. 1
0
 /**
  * Constructor method for FlushCache
  * @param  Cache $cache Cache
  * @return self
  */
 public function __construct(Cache $cache = null)
 {
     parent::__construct();
     if ($cache instanceof Cache) {
         $this->setChild('cache', $cache);
     }
 }
 /**
  * Constructor method for CheckDomainMXRecord
  * @param Domain $domain
  * @return self
  */
 public function __construct(Domain $domain = null)
 {
     parent::__construct();
     if ($domain instanceof Domain) {
         $this->setChild('domain', $domain);
     }
 }
Esempio n. 3
0
 /**
  * Constructor method for GetAllZimlets
  * @param  ExcludeType $exclude Exclude can be "none|extension|mail"
  * @return self
  */
 public function __construct(ExcludeType $exclude = null)
 {
     parent::__construct();
     if ($exclude instanceof ExcludeType) {
         $this->setProperty('exclude', $exclude);
     }
 }
 /**
  * Constructor method for GetSystemRetentionPolicy
  * @param  Cos $cos
  * @return self
  */
 public function __construct(Cos $cos = null)
 {
     parent::__construct();
     if ($cos instanceof Cos) {
         $this->setChild('cos', $cos);
     }
 }
Esempio n. 5
0
 /**
  * Constructor method for GetQuotaUsage
  * @param string $domain Domain - the domain name to limit the search to
  * @param bool $allServers Ưhether to fetch quota usage for all domain accounts from across all mailbox servers, default is false, applicable when domain attribute is specified
  * @param int $limit Limit - the number of accounts to return (0 is default and means all)
  * @param int $offset Offset - the starting offset (0, 25, etc)
  * @param QuotaSortBy $sortBy SortBy - valid values: "percentUsed", "totalUsed", "quotaLimit"
  * @param bool $sortAscending Whether to sort in ascending order 0 (false) is default, so highest quotas are returned first
  * @param bool $refresh Refresh - whether to always recalculate the data even when cached values are available. 0 (false) is the default.
  * @return self
  */
 public function __construct($domain = null, $allServers = null, $limit = null, $offset = null, QuotaSortBy $sortBy = null, $sortAscending = null, $refresh = null)
 {
     parent::__construct();
     if (null !== $domain) {
         $this->setProperty('domain', trim($domain));
     }
     if (null !== $allServers) {
         $this->setProperty('allServers', (bool) $allServers);
     }
     if (null !== $limit) {
         $this->setProperty('limit', (int) $limit);
     }
     if (null !== $offset) {
         $this->setProperty('offset', (int) $offset);
     }
     if ($sortBy instanceof QuotaSortBy) {
         $this->setProperty('sortBy', $sortBy);
     }
     if (null !== $sortAscending) {
         $this->setProperty('sortAscending', (bool) $sortAscending);
     }
     if (null !== $refresh) {
         $this->setProperty('refresh', (bool) $refresh);
     }
 }
Esempio n. 6
0
 /**
  * Constructor method for RevokeRight 
  * @param  Hostname $target Target selector
  * @param  StatsSpec $stats Grantee selector
  * @param  string $limit Right
  * @return self
  */
 public function __construct(Target $target, Grantee $grantee, Right $right)
 {
     parent::__construct();
     $this->setChild('target', $target);
     $this->setChild('grantee', $grantee);
     $this->setChild('right', $right);
 }
Esempio n. 7
0
 /**
  * Constructor method for GetConfig
  * @param  KeyValuePair $attr
  * @return self
  */
 public function __construct(KeyValuePair $attr = null)
 {
     parent::__construct();
     if ($attr instanceof KeyValuePair) {
         $this->setChild('a', $attr);
     }
 }
Esempio n. 8
0
 /**
  * Constructor method for DeleteMailbox
  * @param  Mailbox $mbox Mailbox
  * @return self
  */
 public function __construct(Mailbox $mbox = null)
 {
     parent::__construct();
     if ($mbox instanceof Mailbox) {
         $this->setChild('mbox', $mbox);
     }
 }
Esempio n. 9
0
 /**
  * Constructor method for AdminWaitSet
  * @param string $waitSet Waitset ID
  * @param string $seq Last known sequence number
  * @param WaitSetSpec $addAccounts The WaitSet add spec
  * @param WaitSetSpec $updateAccounts The WaitSet update spec
  * @param WaitSetId $removeAccounts The WaitSet remove spec
  * @param bool   $block Flag whether or not to block until some account has new data
  * @param array  $defTypes Default interest types. Comma-separated list
  * @param int    $timeout Timeout length
  * @return self
  */
 public function __construct($waitSet, $seq, WaitSetSpec $addAccounts = null, WaitSetSpec $updateAccounts = null, WaitSetId $removeAccounts = null, $block = null, array $defTypes = [], $timeout = null)
 {
     parent::__construct();
     $this->setProperty('waitSet', trim($waitSet));
     $this->setProperty('seq', trim($seq));
     if ($addAccounts instanceof WaitSetSpec) {
         $this->setChild('add', $addAccounts);
     }
     if ($updateAccounts instanceof WaitSetSpec) {
         $this->setChild('update', $updateAccounts);
     }
     if ($removeAccounts instanceof WaitSetId) {
         $this->setChild('remove', $removeAccounts);
     }
     if (null !== $block) {
         $this->setProperty('block', (bool) $block);
     }
     if (null !== $timeout) {
         $this->setProperty('timeout', (int) $timeout);
     }
     $this->setDefaultInterests($defTypes);
     $this->on('before', function (Base $sender) {
         $defTypes = $sender->getDefaultInterests();
         if (!empty($defTypes)) {
             $sender->setProperty('defTypes', $defTypes);
         }
     });
 }
Esempio n. 10
0
 /**
  * Constructor method for Auth
  * @param string  $name Name. Only one of {auth-name} or <account> can be specified
  * @param string  $password Password - must be present if not using AuthToken
  * @param string  $authToken An authToken can be passed instead of account/password/name to validate an existing auth authToken.
  * @param Account $account The account
  * @param string  $virtualHost Virtual host
  * @param string  $twoFactorCode The TOTP code used for two-factor authentication
  * @param bool    $persistAuthTokenCookie Controls whether the auth authToken cookie in the response should be persisted when the browser exits.
  * @param bool    $csrfSupported Controls whether the client supports CSRF token
  * @return self
  */
 public function __construct($name = null, $password = null, $authToken = null, Account $account = null, $virtualHost = null, $twoFactorCode = null, $persistAuthTokenCookie = null, $csrfSupported = null)
 {
     parent::__construct();
     if (null !== $name) {
         $this->setProperty('name', trim($name));
     }
     if (null !== $password) {
         $this->setProperty('password', trim($password));
     }
     if (null !== $authToken) {
         $this->setChild('authToken', trim($authToken));
     }
     if ($account instanceof Account) {
         $this->setChild('account', $account);
     }
     if (null !== $virtualHost) {
         $this->setChild('virtualHost', trim($virtualHost));
     }
     if (null !== $twoFactorCode) {
         $this->setChild('twoFactorCode', trim($twoFactorCode));
     }
     if (null !== $persistAuthTokenCookie) {
         $this->setProperty('persistAuthTokenCookie', (bool) $persistAuthTokenCookie);
     }
     if (null !== $csrfSupported) {
         $this->setProperty('csrfSupported', (bool) $csrfSupported);
     }
 }
 /**
  * Constructor method for SearchAutoProvDirectory
  * @param Domain $domain Domain selector for the domain name to limit the search to (do not use if searching for domains)
  * @param string $keyAttr Name of attribute for the key.
  * @param string $query Query string - should be an LDAP-style filter string (RFC 2254)
  * @param string $name Name to fill the auto provisioning search template configured on the domain
  * @param int $maxResults Maximum results that the backend will attempt to fetch from the directory before returning an account
  * @param int $limit The maximum number of accounts to return (0 is default and means all)
  * @param int $offset The starting offset (0, 25, etc)
  * @param bool $refresh Whether to always re-search in LDAP even when cached entries are available. 0 (false) is the default.
  * @param string $attrs Comma separated list of attributes
  * @return self
  */
 public function __construct(Domain $domain, $keyAttr, $query = null, $name = null, $maxResults = null, $limit = null, $offset = null, $refresh = null, array $attrs = [])
 {
     parent::__construct();
     $this->setChild('domain', $domain);
     $this->setProperty('keyAttr', trim($keyAttr));
     if (null !== $query) {
         $this->setProperty('query', trim($query));
     }
     if (null !== $name) {
         $this->setProperty('name', trim($name));
     }
     if (null !== $maxResults) {
         $this->setProperty('maxResults', (int) $maxResults);
     }
     if (null !== $limit) {
         $this->setProperty('limit', (int) $limit);
     }
     if (null !== $offset) {
         $this->setProperty('offset', (int) $offset);
     }
     if (null !== $refresh) {
         $this->setProperty('refresh', (bool) $refresh);
     }
     $this->setAttrs($attrs);
     $this->on('before', function (Base $sender) {
         $attrs = $sender->getAttrs();
         if (!empty($attrs)) {
             $sender->setProperty('attrs', $attrs);
         }
     });
 }
Esempio n. 12
0
 /**
  * Constructor method for GenCSR
  * @param string $server Server ID
  * @param bool $new If value is "1" then force to create a new CSR, the previous one will be overwrited
  * @param CSRType $type Type of CSR (self|comm)
  * @param CSRKeySize $keysize Key size - 1024 or 2048
  * @param string $c Subject attr C
  * @param string $st Subject attr ST
  * @param string $L Subject attr L
  * @param string $O Subject attr O
  * @param string $OU Subject attr OU
  * @param string $CN Subject attr CN
  * @param array $subjectAltNames Used to add the Subject Alt Name extension in the certificate, so multiple hosts can be supported
  * @return self
  */
 public function __construct($server, $new, CSRType $type, CSRKeySize $keysize, $c = null, $st = null, $l = null, $o = null, $ou = null, $cn = null, array $subjectAltNames = [])
 {
     parent::__construct();
     $this->setProperty('server', trim($server));
     $this->setProperty('new', (bool) $new);
     $this->setProperty('type', $type);
     $this->setProperty('keysize', $keysize);
     if (null !== $c) {
         $this->setChild('C', trim($c));
     }
     if (null !== $st) {
         $this->setChild('ST', trim($st));
     }
     if (null !== $l) {
         $this->setChild('L', trim($l));
     }
     if (null !== $o) {
         $this->setChild('O', trim($o));
     }
     if (null !== $ou) {
         $this->setChild('OU', trim($ou));
     }
     if (null !== $cn) {
         $this->setChild('CN', trim($cn));
     }
     $this->setSubjectAltNames($subjectAltNames);
     $this->on('before', function (Base $sender) {
         if ($sender->getSubjectAltNames()->count()) {
             $sender->setChild('SubjectAltName', $sender->getSubjectAltNames()->all());
         }
     });
 }
Esempio n. 13
0
 /**
  * Constructor method for SyncGalAccount
  * @param  Account $account SyncGalAccount data source specifications.
  * @return self
  */
 public function __construct(Account $account = null)
 {
     parent::__construct();
     if ($account instanceof Account) {
         $this->setChild('account', $account);
     }
 }
Esempio n. 14
0
 /**
  * Constructor method for PurgeFreeBusyQueue
  * @param Provider $provider Provider information
  * @return self
  */
 public function __construct(NamedElement $provider = null)
 {
     parent::__construct();
     if ($provider instanceof NamedElement) {
         $this->setChild('provider', $provider);
     }
 }
 /**
  * Constructor method for SearchCalendarResources
  * @param EntrySearchFilterInfo $searchFilter Search filter specification
  * @param int $limit The maximum number of calendar resources to return (0 is default and means all)
  * @param int $offset The starting offset (0, 25, etc)
  * @param string $domain The domain name to limit the search to
  * @param bool $applyCos Flag whether or not to apply the COS policy to calendar resource. Specify 0 (false) if only requesting attrs that aren't inherited from COS.
  * @param string $sortBy Name of attribute to sort on. default is the calendar resource name.
  * @param bool $sortAscending Whether to sort in ascending order. Default is 1 (true)
  * @param string $attrs Comma separated list of attributes
  * @return self
  */
 public function __construct(SearchFilter $searchFilter = null, $limit = null, $offset = null, $domain = null, $applyCos = null, $sortBy = null, $sortAscending = null, array $attrs = [])
 {
     parent::__construct();
     if ($searchFilter instanceof SearchFilter) {
         $this->setChild('searchFilter', $searchFilter);
     }
     if (null !== $limit) {
         $this->setProperty('limit', (int) $limit);
     }
     if (null !== $offset) {
         $this->setProperty('offset', (int) $offset);
     }
     if (null !== $domain) {
         $this->setProperty('domain', trim($domain));
     }
     if (null !== $applyCos) {
         $this->setProperty('applyCos', (bool) $applyCos);
     }
     if (null !== $sortBy) {
         $this->setProperty('sortBy', trim($sortBy));
     }
     if (null !== $sortAscending) {
         $this->setProperty('sortAscending', (bool) $sortAscending);
     }
     $this->setAttrs($attrs);
     $this->on('before', function (Base $sender) {
         $attrs = $sender->getAttrs();
         if (!empty($attrs)) {
             $sender->setProperty('attrs', $attrs);
         }
     });
 }
Esempio n. 16
0
 /**
  * Constructor method for CompactIndex
  * @param Mailbox $mbox Mailbox
  * @param Action $action Action to perform
  * @return self
  */
 public function __construct(Mailbox $mbox, Action $action = null)
 {
     parent::__construct();
     $this->setChild('mbox', $mbox);
     if ($action instanceof Action) {
         $this->setProperty('action', $action);
     }
 }
Esempio n. 17
0
 /**
  * Constructor method for DelegateAuth
  * @param  Account $account Details of target account
  * @param  int $duration Lifetime in seconds of the newly-created authtoken. defaults to 1 hour.
  * @return self
  */
 public function __construct(Account $account, $duration = null)
 {
     parent::__construct();
     $this->setChild('account', $account);
     if (null !== $duration) {
         $this->setProperty('duration', (int) $duration);
     }
 }
Esempio n. 18
0
 /**
  * Constructor method for LockoutMailbox
  * @param Account $account The account
  * @param LockoutOperation  $operation operation
  * @return self
  */
 public function __construct(Account $account, LockoutOperation $operation = null)
 {
     parent::__construct();
     $this->setChild('account', $account);
     if ($operation instanceof LockoutOperation) {
         $this->setProperty('op', $operation);
     }
 }
Esempio n. 19
0
 /**
  * Constructor method for GetServerNIfs
  * @param  Server $server Server
  * @param  string $type Specifics the ipAddress type (ipV4/ipV6/both). default is ipv4
  * @return self
  */
 public function __construct(Server $server, IpType $type = null)
 {
     parent::__construct();
     $this->setChild('server', $server);
     if ($type instanceof IpType) {
         $this->setProperty('type', $type);
     }
 }
Esempio n. 20
0
 /**
  * Constructor method for GetCSR
  * @param  string $server Server ID. Can be "--- All Servers ---" or the ID of a server
  * @param  CSRType $type Type of CSR. self: self-signed certificate. comm: commercial certificate
  * @return self
  */
 public function __construct($server = null, CSRType $type = null)
 {
     parent::__construct();
     $this->setProperty('server', trim($server));
     if ($type instanceof CSRType) {
         $this->setProperty('type', $type);
     }
 }
Esempio n. 21
0
 /**
  * Constructor method for GetShareInfo
  * @param  Owner $owner
  * @param  Grantee $grantee
  * @return self
  */
 public function __construct(Owner $owner, Grantee $grantee = null)
 {
     parent::__construct();
     $this->setChild('owner', $owner);
     if ($grantee instanceof Grantee) {
         $this->setChild('grantee', $grantee);
     }
 }
Esempio n. 22
0
 /**
  * Constructor method for RemoveDevice
  * @param  Account $account Use to select account
  * @param  Device $device Device specification - Note - if not supplied ALL Devices will be removed.
  * @return self
  */
 public function __construct(Account $account, Device $device = null)
 {
     parent::__construct();
     $this->setChild('account', $account);
     if ($device instanceof Device) {
         $this->setChild('device', $device);
     }
 }
Esempio n. 23
0
 /**
  * Constructor method for AutoProvAccount
  * @param Domain $domain The domain
  * @param Principal $principal The principal
  * @param string $password The password
  * @return self
  */
 public function __construct(Domain $domain, Principal $principal, $password = null)
 {
     parent::__construct();
     $this->setChild('domain', $domain);
     $this->setChild('principal', $principal);
     if (null !== $password) {
         $this->setChild('password', trim($password));
     }
 }
Esempio n. 24
0
 /**
  * Constructor method for GetCert
  * @param  string $server The server's ID whose cert is to be got
  * @param  CertType $type Certificate type 
  * @param  CSRType $option Required only when type is "staged". Could be "self" (self-signed cert) or "comm" (commerical cert).
  * @return self
  */
 public function __construct($server, CertType $type, CSRType $option = null)
 {
     parent::__construct();
     $this->setProperty('server', trim($server));
     $this->setProperty('type', $type);
     if ($option instanceof CSRType) {
         $this->setProperty('option', $option);
     }
 }
 /**
  * Constructor method for GetAllCalendarResources
  * @param  Server $server
  * @param  Domain $domain
  * @return self
  */
 public function __construct(Server $server = null, Domain $domain = null)
 {
     parent::__construct();
     if ($server instanceof Server) {
         $this->setChild('server', $server);
     }
     if ($domain instanceof Domain) {
         $this->setChild('domain', $domain);
     }
 }
Esempio n. 26
0
 /**
  * Constructor method for GetDomainInfo
  * @param  Domain $account Domain
  * @param  bool $applyConfig Apply config flag
  * @return self
  */
 public function __construct(Domain $domain = null, $applyConfig = null)
 {
     parent::__construct();
     if ($domain instanceof Domain) {
         $this->setChild('domain', $domain);
     }
     if (null !== $applyConfig) {
         $this->setProperty('applyConfig', (bool) $applyConfig);
     }
 }
 /**
  * Constructor method for ModifyAdminSavedSearches
  * @param  array $searches
  * @return self
  */
 public function __construct(array $searches = [])
 {
     parent::__construct();
     $this->setSearches($searches);
     $this->on('before', function (Base $sender) {
         if ($sender->getSearches()->count()) {
             $sender->setChild('search', $sender->getSearches()->all());
         }
     });
 }
Esempio n. 28
0
 /**
  * Constructor method for CheckDirectory
  * @param array $directories Directories
  * @return self
  */
 public function __construct(array $directories = [])
 {
     parent::__construct();
     $this->setDirectories($directories);
     $this->on('before', function (Base $sender) {
         if ($sender->getDirectories()->count()) {
             $sender->setChild('directory', $sender->getDirectories()->all());
         }
     });
 }
Esempio n. 29
0
 /**
  * Constructor method for RunUnitTests
  * @param  array  $tests
  * @return self
  */
 public function __construct(array $tests = [])
 {
     parent::__construct();
     $this->setTests($tests);
     $this->on('before', function (Base $sender) {
         if ($sender->getTests()->count()) {
             $sender->setChild('test', $sender->getTests()->all());
         }
     });
 }
Esempio n. 30
0
 /**
  * Constructor method for CopyCos
  * @param string $name Destination name for COS
  * @param Cos $cos Source COS
  * @return self
  */
 public function __construct($name = null, Cos $cos = null)
 {
     parent::__construct();
     if (null !== $name) {
         $this->setChild('name', trim($name));
     }
     if ($cos instanceof Cos) {
         $this->setChild('cos', $cos);
     }
 }