本文整理汇总了PHP中Zimbra\Admin\Request\Base类的典型用法代码示例。如果您正苦于以下问题:PHP Base类的具体用法?PHP Base怎么用?PHP Base使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Base类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* 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);
}
});
}
示例2: __construct
/**
* 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);
}
});
}
示例3: __construct
/**
* 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());
}
});
}
示例4: __construct
/**
* 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);
}
});
}
示例5: __construct
/**
* 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);
}
}
示例6: __construct
/**
* 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);
}
}
示例7: __construct
/**
* 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);
}
}
示例8: __construct
/**
* 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);
}
}
示例9: __construct
/**
* 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);
}
}
示例10: __construct
/**
* 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);
}
示例11: __construct
/**
* 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);
}
}
示例12: __construct
/**
* 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);
}
}
示例13: __construct
/**
* 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);
}
}
示例14: __construct
/**
* 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);
}
}
示例15: __construct
/**
* 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);
}
}