php Zimbra-Admin-Request-Base类(方法)实例源码

下面列出了php Zimbra-Admin-Request-Base 类(方法)源码代码实例,从而了解它的用法。

作者:zimbra-ap    项目:admi   
/**
  * 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);
         }
     });
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
         }
     });
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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());
         }
     });
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
         }
     });
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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());
         }
     });
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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());
         }
     });
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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());
         }
     });
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }

作者:zimbra-ap    项目:admi   
/**
  * 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);
     }
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }

作者:zimbra-ap    项目:admi   
/**
  * 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);
     }
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }

作者:nucleus-b    项目:zimbra-ap   
/**
  * 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);
     }
 }


问题


面经


文章

微信
公众号

扫码关注公众号