当前位置: 首页>>代码示例>>PHP>>正文


PHP Base::__construct方法代码示例

本文整理汇总了PHP中Zimbra\Mail\Request\Base::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Base::__construct方法的具体用法?PHP Base::__construct怎么用?PHP Base::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Zimbra\Mail\Request\Base的用法示例。


在下文中一共展示了Base::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 /**
  * Constructor method for ImportData
  * @param  array $dataSources
  * @return self
  */
 public function __construct(array $dataSources = [])
 {
     parent::__construct();
     $this->setDataSources($dataSources);
     $this->on('before', function (Base $sender) {
         if ($sender->getDataSources()->count()) {
             foreach ($sender->getDataSources()->all() as $dataSource) {
                 if ($dataSource instanceof ImapDataSourceNameOrId) {
                     $this->setChild('imap', $dataSource);
                 }
                 if ($dataSource instanceof Pop3DataSourceNameOrId) {
                     $this->setChild('pop3', $dataSource);
                 }
                 if ($dataSource instanceof CaldavDataSourceNameOrId) {
                     $this->setChild('caldav', $dataSource);
                 }
                 if ($dataSource instanceof YabDataSourceNameOrId) {
                     $this->setChild('yab', $dataSource);
                 }
                 if ($dataSource instanceof RssDataSourceNameOrId) {
                     $this->setChild('rss', $dataSource);
                 }
                 if ($dataSource instanceof GalDataSourceNameOrId) {
                     $this->setChild('gal', $dataSource);
                 }
                 if ($dataSource instanceof CalDataSourceNameOrId) {
                     $this->setChild('cal', $dataSource);
                 }
                 if ($dataSource instanceof UnknownDataSourceNameOrId) {
                     $this->setChild('unknown', $dataSource);
                 }
             }
         }
     });
 }
开发者ID:zimbra-api,项目名称:mail,代码行数:40,代码来源:ImportData.php

示例2: __construct

 /**
  * Constructor method for ExpandRecur
  * @param  int $startTime
  * @param  int $endTime
  * @param  array $timezones
  * @param  array $components
  * @return self
  */
 public function __construct($startTime, $endTime, array $timezones = [], array $components = [])
 {
     parent::__construct();
     $this->setProperty('s', (int) $startTime);
     $this->setProperty('e', (int) $endTime);
     $this->setTimezones($timezones);
     $this->setComponents($components);
     $this->on('before', function (Base $sender) {
         if ($sender->getTimezones()->count()) {
             $sender->setChild('tz', $sender->getTimezones()->all());
         }
         if ($sender->getComponents()->count()) {
             foreach ($sender->getComponents()->all() as $component) {
                 if ($component instanceof ExpandedRecurrenceInvite) {
                     $this->setChild('comp', $component);
                 }
                 if ($component instanceof ExpandedRecurrenceException) {
                     $this->setChild('except', $component);
                 }
                 if ($component instanceof ExpandedRecurrenceCancel) {
                     $this->setChild('cancel', $component);
                 }
             }
         }
     });
 }
开发者ID:zimbra-api,项目名称:mail,代码行数:34,代码来源:ExpandRecur.php

示例3: __construct

 /**
  * Constructor method for DeclineCounterAppointment
  * @param  Msg $m
  * @return self
  */
 public function __construct(Msg $m = null)
 {
     parent::__construct();
     if ($m instanceof Msg) {
         $this->child('m', $m);
     }
 }
开发者ID:nucleus-be,项目名称:zimbra-api,代码行数:12,代码来源:DeclineCounterAppointment.php

示例4: __construct

 /**
  * Constructor method for DeleteDataSource
  * @param  ImapDataSourceNameOrId $imap
  * @param  Pop3DataSourceNameOrId $pop3
  * @param  CaldavDataSourceNameOrId $caldav
  * @param  YabDataSourceNameOrId $yab
  * @param  RssDataSourceNameOrId $rss
  * @param  GalDataSourceNameOrId $gal
  * @param  CalDataSourceNameOrId $cal
  * @param  UnknownDataSourceNameOrId $unknown
  * @return self
  */
 public function __construct(ImapDataSourceNameOrId $imap = null, Pop3DataSourceNameOrId $pop3 = null, CaldavDataSourceNameOrId $caldav = null, YabDataSourceNameOrId $yab = null, RssDataSourceNameOrId $rss = null, GalDataSourceNameOrId $gal = null, CalDataSourceNameOrId $cal = null, UnknownDataSourceNameOrId $unknown = null)
 {
     parent::__construct();
     if ($imap instanceof ImapDataSourceNameOrId) {
         $this->child('imap', $imap);
     }
     if ($pop3 instanceof Pop3DataSourceNameOrId) {
         $this->child('pop3', $pop3);
     }
     if ($caldav instanceof CaldavDataSourceNameOrId) {
         $this->child('caldav', $caldav);
     }
     if ($yab instanceof YabDataSourceNameOrId) {
         $this->child('yab', $yab);
     }
     if ($rss instanceof RssDataSourceNameOrId) {
         $this->child('rss', $rss);
     }
     if ($gal instanceof GalDataSourceNameOrId) {
         $this->child('gal', $gal);
     }
     if ($cal instanceof CalDataSourceNameOrId) {
         $this->child('cal', $cal);
     }
     if ($unknown instanceof UnknownDataSourceNameOrId) {
         $this->child('unknown', $unknown);
     }
 }
开发者ID:nucleus-be,项目名称:zimbra-api,代码行数:40,代码来源:DeleteDataSource.php

示例5: __construct

 /**
  * Constructor method for SetMailboxMetadata
  * @param  MailCustomMetadata $meta
  * @return self
  */
 public function __construct(MailCustomMetadata $meta = null)
 {
     parent::__construct();
     if ($meta instanceof MailCustomMetadata) {
         $this->setChild('meta', $meta);
     }
 }
开发者ID:zimbra-api,项目名称:mail,代码行数:12,代码来源:SetMailboxMetadata.php

示例6: __construct

 /**
  * Constructor method for CheckRecurConflicts
  * @param  array $tz
  * @param  ExpandedRecurrenceCancel $cancel
  * @param  ExpandedRecurrenceInvite $comp
  * @param  ExpandedRecurrenceException $except
  * @param  array $usr
  * @param  int $s
  * @param  int $e
  * @param  bool $all
  * @param  string $excludeUid
  * @return self
  */
 public function __construct(array $tz = array(), ExpandedRecurrenceCancel $cancel = null, ExpandedRecurrenceInvite $comp = null, ExpandedRecurrenceException $except = null, array $usr = array(), $s = null, $e = null, $all = null, $excludeUid = null)
 {
     parent::__construct();
     $this->_tz = new TypedSequence('Zimbra\\Mail\\Struct\\CalTZInfo', $tz);
     if ($cancel instanceof ExpandedRecurrenceCancel) {
         $this->child('cancel', $cancel);
     }
     if ($comp instanceof ExpandedRecurrenceInvite) {
         $this->child('comp', $comp);
     }
     if ($except instanceof ExpandedRecurrenceException) {
         $this->child('except', $except);
     }
     $this->_usr = new TypedSequence('Zimbra\\Mail\\Struct\\FreeBusyUserSpec', $usr);
     if (null !== $s) {
         $this->property('s', (int) $s);
     }
     if (null !== $e) {
         $this->property('e', (int) $e);
     }
     if (null !== $all) {
         $this->property('all', (bool) $all);
     }
     if (null !== $excludeUid) {
         $this->property('excludeUid', trim($excludeUid));
     }
     $this->on('before', function (Base $sender) {
         if ($sender->tz()->count()) {
             $sender->child('tz', $sender->tz()->all());
         }
         if ($sender->usr()->count()) {
             $sender->child('usr', $sender->usr()->all());
         }
     });
 }
开发者ID:nucleus-be,项目名称:zimbra-api,代码行数:48,代码来源:CheckRecurConflicts.php

示例7: __construct

 /**
  * Constructor method for WaitSet
  * @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);
         }
     });
 }
开发者ID:zimbra-api,项目名称:mail,代码行数:40,代码来源:WaitSet.php

示例8: __construct

 /**
  * Constructor method for CancelAppointment
  * @param  InstanceRecurIdInfo $inst
  * @param  CalTZInfo $tz
  * @param  Msg $m
  * @param  string $id
  * @param  int $comp
  * @param  int $ms
  * @param  int $rev
  * @return self
  */
 public function __construct(InstanceRecurIdInfo $inst = null, CalTZInfo $tz = null, Msg $m = null, $id = null, $comp = null, $ms = null, $rev = null)
 {
     parent::__construct();
     if ($inst instanceof InstanceRecurIdInfo) {
         $this->setChild('inst', $inst);
     }
     if ($tz instanceof CalTZInfo) {
         $this->setChild('tz', $tz);
     }
     if ($m instanceof Msg) {
         $this->setChild('m', $m);
     }
     if (null !== $id) {
         $this->setProperty('id', trim($id));
     }
     if (null !== $comp) {
         $this->setProperty('comp', (int) $comp);
     }
     if (null !== $ms) {
         $this->setProperty('ms', (int) $ms);
     }
     if (null !== $rev) {
         $this->setProperty('rev', (int) $rev);
     }
 }
开发者ID:zimbra-api,项目名称:mail,代码行数:36,代码来源:CancelAppointment.php

示例9: __construct

 /**
  * Constructor method for ModifyDataSource
  * @param  MailDataSource $ds
  * @return self
  */
 public function __construct(MailDataSource $ds = null)
 {
     parent::__construct();
     if ($ds instanceof MailImapDataSource) {
         $this->child('imap', $ds);
     }
     if ($ds instanceof MailPop3DataSource) {
         $this->child('pop3', $ds);
     }
     if ($ds instanceof MailCaldavDataSource) {
         $this->child('caldav', $ds);
     }
     if ($ds instanceof MailYabDataSource) {
         $this->child('yab', $ds);
     }
     if ($ds instanceof MailRssDataSource) {
         $this->child('rss', $ds);
     }
     if ($ds instanceof MailGalDataSource) {
         $this->child('gal', $ds);
     }
     if ($ds instanceof MailCalDataSource) {
         $this->child('cal', $ds);
     }
     if ($ds instanceof MailUnknownDataSource) {
         $this->child('unknown', $ds);
     }
 }
开发者ID:nucleus-be,项目名称:zimbra-api,代码行数:33,代码来源:ModifyDataSource.php

示例10: __construct

 /**
  * Constructor method for TestDataSource
  * @param  MailDataSource $dataSource
  * @return self
  */
 public function __construct(MailDataSource $dataSource = null)
 {
     parent::__construct();
     if ($dataSource instanceof MailDataSource) {
         $this->_dataSource = $dataSource;
     }
     $this->on('before', function (Base $sender) {
         if ($this->_dataSource instanceof MailImapDataSource) {
             $this->setChild('imap', $this->_dataSource);
         }
         if ($this->_dataSource instanceof MailPop3DataSource) {
             $this->setChild('pop3', $this->_dataSource);
         }
         if ($this->_dataSource instanceof MailCaldavDataSource) {
             $this->setChild('caldav', $this->_dataSource);
         }
         if ($this->_dataSource instanceof MailYabDataSource) {
             $this->setChild('yab', $this->_dataSource);
         }
         if ($this->_dataSource instanceof MailRssDataSource) {
             $this->setChild('rss', $this->_dataSource);
         }
         if ($this->_dataSource instanceof MailGalDataSource) {
             $this->setChild('gal', $this->_dataSource);
         }
         if ($this->_dataSource instanceof MailCalDataSource) {
             $this->setChild('cal', $this->_dataSource);
         }
         if ($this->_dataSource instanceof MailUnknownDataSource) {
             $this->setChild('unknown', $this->_dataSource);
         }
     });
 }
开发者ID:zimbra-api,项目名称:mail,代码行数:38,代码来源:TestDataSource.php

示例11: __construct

 /**
  * Constructor method for GetMailboxMetadata
  * @param  SectionAttr $meta
  * @return self
  */
 public function __construct(SectionAttr $meta = null)
 {
     parent::__construct();
     if ($meta instanceof SectionAttr) {
         $this->child('meta', $meta);
     }
 }
开发者ID:nucleus-be,项目名称:zimbra-api,代码行数:12,代码来源:GetMailboxMetadata.php

示例12: __construct

 /**
  * Constructor method for WaitSet
  * @param  string $waitSet
  * @param  string $seq
  * @param  WaitSetSpec $add
  * @param  WaitSetSpec $update
  * @param  WaitSetId $remove
  * @param  bool $block
  * @param  array $defTypes
  * @param  int $timeout
  * @return self
  */
 public function __construct($waitSet, $seq, WaitSetSpec $add = null, WaitSetSpec $update = null, WaitSetId $remove = null, $block = null, array $defTypes = array(), $timeout = null)
 {
     parent::__construct();
     $this->property('waitSet', trim($waitSet));
     $this->property('seq', trim($seq));
     if ($add instanceof WaitSetSpec) {
         $this->child('add', $add);
     }
     if ($update instanceof WaitSetSpec) {
         $this->child('update', $update);
     }
     if ($remove instanceof WaitSetId) {
         $this->child('remove', $remove);
     }
     if (null !== $block) {
         $this->property('block', (bool) $block);
     }
     $this->_defTypes = new TypedSequence('Zimbra\\Enum\\InterestType', $defTypes);
     if (null !== $timeout) {
         $this->property('timeout', (int) $timeout);
     }
     $this->on('before', function (Base $sender) {
         $defTypes = $sender->defTypes();
         if (!empty($defTypes)) {
             $sender->property('defTypes', $defTypes);
         }
     });
 }
开发者ID:nucleus-be,项目名称:zimbra-api,代码行数:40,代码来源:WaitSet.php

示例13: __construct

 /**
  * Constructor method for DeleteDataSource
  * @param  DataSourceNameOrId $ds
  * @return self
  */
 public function __construct(DataSourceNameOrId $ds = null)
 {
     parent::__construct();
     if ($ds instanceof DataSourceNameOrId) {
         $this->_dataSource = $ds;
     }
     $this->on('before', function (Base $sender) {
         if ($this->_dataSource instanceof ImapDataSourceNameOrId) {
             $this->setChild('imap', $this->_dataSource);
         }
         if ($this->_dataSource instanceof Pop3DataSourceNameOrId) {
             $this->setChild('pop3', $this->_dataSource);
         }
         if ($this->_dataSource instanceof CaldavDataSourceNameOrId) {
             $this->setChild('caldav', $this->_dataSource);
         }
         if ($this->_dataSource instanceof YabDataSourceNameOrId) {
             $this->setChild('yab', $this->_dataSource);
         }
         if ($this->_dataSource instanceof RssDataSourceNameOrId) {
             $this->setChild('rss', $this->_dataSource);
         }
         if ($this->_dataSource instanceof GalDataSourceNameOrId) {
             $this->setChild('gal', $this->_dataSource);
         }
         if ($this->_dataSource instanceof CalDataSourceNameOrId) {
             $this->setChild('cal', $this->_dataSource);
         }
         if ($this->_dataSource instanceof UnknownDataSourceNameOrId) {
             $this->setChild('unknown', $this->_dataSource);
         }
     });
 }
开发者ID:zimbra-api,项目名称:mail,代码行数:38,代码来源:DeleteDataSource.php

示例14: __construct

 /**
  * Constructor method for CreateContact
  * @param  ContactSpec $cn
  * @param  bool $verbose
  * @return self
  */
 public function __construct(ContactSpec $cn, $verbose = null)
 {
     parent::__construct();
     $this->child('cn', $cn);
     if (null !== $verbose) {
         $this->property('verbose', (bool) $verbose);
     }
 }
开发者ID:nucleus-be,项目名称:zimbra-api,代码行数:14,代码来源:CreateContact.php

示例15: __construct

 /**
  * Constructor method for GetCustomMetadata
  * @param  string $id
  * @param  SectionAttr $metadata
  * @return self
  */
 public function __construct($id, SectionAttr $metadata = null)
 {
     parent::__construct();
     $this->setProperty('id', trim($id));
     if ($metadata instanceof SectionAttr) {
         $this->setChild('meta', $metadata);
     }
 }
开发者ID:zimbra-api,项目名称:mail,代码行数:14,代码来源:GetCustomMetadata.php


注:本文中的Zimbra\Mail\Request\Base::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。