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


PHP Server::subscribeEvent方法代码示例

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


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

示例1: initialize

 /**
  * Initializes the plugin and registers event handlers 
  * 
  * @param \Sabre\DAV\Server $server 
  * @return void
  */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $this->server->subscribeEvent('beforeMethod', array($this, 'beforeMethod'), 90);
     $this->server->subscribeEvent('afterCreateFile', array($this, 'afterCreateFile'), 90);
     $this->server->subscribeEvent('afterWriteContent', array($this, 'afterWriteContent'), 90);
 }
开发者ID:BertLasker,项目名称:Catch-design,代码行数:13,代码来源:Plugin.php

示例2: initialize

 /**
  * Initializes the plugin
  *
  * This method is automatically called by the Server class after addPlugin.
  *
  * @param DAV\Server $server
  * @return void
  */
 public function initialize(DAV\Server $server)
 {
     $this->server = $server;
     $server->subscribeEvent('unknownMethod', array($this, 'unknownMethod'));
     $server->subscribeEvent('beforeMethod', array($this, 'beforeMethod'), 50);
     $server->subscribeEvent('afterGetProperties', array($this, 'afterGetProperties'));
 }
开发者ID:nbey,项目名称:Emergence-Skeleton,代码行数:15,代码来源:Plugin.php

示例3: initialize

 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $server->subscribeEvent('beforeMethod', array($this, 'httpGetInterceptor'));
     $server->subscribeEvent('beforeMethod', array($this, 'beforeMethod'));
     $server->subscribeEvent('beforeCreateFile', array($this, 'beforeCreateFile'));
 }
开发者ID:nbey,项目名称:Emergence-Skeleton,代码行数:7,代码来源:ServerPlugin.php

示例4: initialize

 /**
  * Initializes the plugin
  *
  * @param \Sabre\DAV\Server $server
  * @return void
  */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $this->server->subscribeEvent('beforeMethod', array($this, 'beforeMethod'));
     $this->server->subscribeEvent('beforeBind', array($this, 'beforeBind'), 30);
     $this->server->subscribeEvent('afterUnbind', array($this, 'afterUnbind'), 30);
 }
开发者ID:hallnewman,项目名称:webmail-lite,代码行数:13,代码来源:Plugin.php

示例5: initialize

 /**
  * This initializes the plugin.
  *
  * This function is called by \Sabre\DAV\Server, after
  * addPlugin is called.
  *
  * This method should set up the required event subscriptions.
  *
  * @param \Sabre\DAV\Server $server
  * @return void
  */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $server->xmlNamespaces[self::NS_OWNCLOUD] = 'oc';
     $server->propertyMap[self::TAGS_PROPERTYNAME] = 'OC\\Connector\\Sabre\\TagList';
     $this->server = $server;
     $this->server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $this->server->subscribeEvent('beforeGetPropertiesForPath', array($this, 'beforeGetPropertiesForPath'));
     $this->server->subscribeEvent('updateProperties', array($this, 'updateProperties'));
 }
开发者ID:heldernl,项目名称:owncloud8-extended,代码行数:20,代码来源:tagsplugin.php

示例6: initialize

 /**
  * This initializes the plugin.
  *
  * This function is called by \Sabre\DAV\Server, after
  * addPlugin is called.
  *
  * This method should set up the required event subscriptions.
  *
  * @param \Sabre\DAV\Server $server
  * @return void
  */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $server->xmlNamespaces[self::NS_OWNCLOUD] = 'oc';
     $server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}id';
     $server->protectedProperties[] = '{' . self::NS_OWNCLOUD . '}permissions';
     $this->server = $server;
     $this->server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $this->server->subscribeEvent('afterCreateFile', array($this, 'sendFileIdHeader'));
     $this->server->subscribeEvent('afterWriteContent', array($this, 'sendFileIdHeader'));
 }
开发者ID:CDN-Sparks,项目名称:owncloud,代码行数:21,代码来源:filesplugin.php

示例7: initialize

 /**
  * Initializes the plugin 
  * 
  * @param \Sabre\DAV\Server $server 
  * @return void
  */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $this->server->subscribeEvent('unknownMethod', array($this, 'httpPOSTHandler'));
     $server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $server->xmlNamespaces[\Sabre\CalDAV\Plugin::NS_CALENDARSERVER] = 'cs';
     $server->resourceTypeMapping['\\Sabre\\CalDAV\\ICalendar'] = '{urn:ietf:params:xml:ns:caldav}calendar';
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:14,代码来源:PluginManagedAttachments.php

示例8: initialize

 /**
  * Initializes the plugin 
  * 
  * @param \Sabre\DAV\Server $server 
  * @return void
  */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $server->xmlNamespaces[\Sabre\CalDAV\Plugin::NS_CALDAV] = 'cal';
     $server->resourceTypeMapping['\\Sabre\\CalDAV\\ICalendar'] = '{urn:ietf:params:xml:ns:caldav}calendar';
     // auto-scheduling extension
     array_push($server->protectedProperties, '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}schedule-calendar-transp', '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}schedule-default-calendar-URL', '{' . \Sabre\CalDAV\Plugin::NS_CALDAV . '}schedule-tag');
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:15,代码来源:PluginAutoSchedule.php

示例9: initialize

 /**
  * Initializes the plugin 
  * 
  * @param \Sabre\DAV\Server $server 
  * @return void
  */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $server->xmlNamespaces[\Sabre\CalDAV\Plugin::NS_CALDAV] = 'cal';
     $server->xmlNamespaces[\Sabre\CalDAV\Plugin::NS_CALENDARSERVER] = 'cs';
     #$server->subscribeEvent('beforeGetProperties',array($this,'beforeGetProperties'));
     $server->subscribeEvent('report', array($this, 'report'));
     array_push($server->protectedProperties, '{' . \Sabre\CalDAV\Plugin::NS_CALENDARSERVER . '}record-type', '{' . \Sabre\CalDAV\Plugin::NS_CALENDARSERVER . '}first-name', '{' . \Sabre\CalDAV\Plugin::NS_CALENDARSERVER . '}last-name');
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:15,代码来源:PrincipalSearch.php

示例10: testUpdatePropertiesEventSuccess

 function testUpdatePropertiesEventSuccess()
 {
     $tree = array(new SimpleCollection('foo'));
     $server = new Server($tree);
     $server->subscribeEvent('updateProperties', array($this, 'updatepropsuccess'));
     $result = $server->updateProperties('foo', array('{DAV:}foo' => 'bar', '{DAV:}foo2' => 'bla'));
     $expected = array('href' => 'foo', '200' => array('{DAV:}foo' => null), '201' => array('{DAV:}foo2' => null));
     $this->assertEquals($expected, $result);
 }
开发者ID:TamirAl,项目名称:hubzilla,代码行数:9,代码来源:ServerUpdatePropertiesTest.php

示例11: initialize

 /**
  * Initializes the plugin 
  * 
  * @param \Sabre\DAV\Server $server 
  * @return void
  */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $self = $this;
     $server->subscribeEvent('report', function ($reportName, $dom, $uri) use($self, $server) {
         if ($reportName === '{DAV:}sync-collection') {
             $server->transactionType = 'report-sync-collection';
             $self->syncCollection($uri, $dom);
             return false;
         }
     });
 }
开发者ID:ingoratsdorf,项目名称:Tine-2.0-Open-Source-Groupware-and-CRM,代码行数:18,代码来源:SyncToken.php

示例12: initialize

 /**
  * Initializes the plugin
  *
  * @param DAV\Server $server
  * @return void
  */
 public function initialize(DAV\Server $server)
 {
     /* Events */
     $server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $server->subscribeEvent('afterGetProperties', array($this, 'afterGetProperties'));
     $server->subscribeEvent('updateProperties', array($this, 'updateProperties'));
     $server->subscribeEvent('report', array($this, 'report'));
     $server->subscribeEvent('onHTMLActionsPanel', array($this, 'htmlActionsPanel'));
     $server->subscribeEvent('onBrowserPostAction', array($this, 'browserPostAction'));
     $server->subscribeEvent('beforeWriteContent', array($this, 'beforeWriteContent'));
     $server->subscribeEvent('beforeCreateFile', array($this, 'beforeCreateFile'));
     /* Namespaces */
     $server->xmlNamespaces[self::NS_CARDDAV] = 'card';
     /* Mapping Interfaces to {DAV:}resourcetype values */
     $server->resourceTypeMapping['Sabre\\CardDAV\\IAddressBook'] = '{' . self::NS_CARDDAV . '}addressbook';
     $server->resourceTypeMapping['Sabre\\CardDAV\\IDirectory'] = '{' . self::NS_CARDDAV . '}directory';
     /* Adding properties that may never be changed */
     $server->protectedProperties[] = '{' . self::NS_CARDDAV . '}supported-address-data';
     $server->protectedProperties[] = '{' . self::NS_CARDDAV . '}max-resource-size';
     $server->protectedProperties[] = '{' . self::NS_CARDDAV . '}addressbook-home-set';
     $server->protectedProperties[] = '{' . self::NS_CARDDAV . '}supported-collation-set';
     $server->propertyMap['{http://calendarserver.org/ns/}me-card'] = 'Sabre\\DAV\\Property\\Href';
     $this->server = $server;
 }
开发者ID:pkdevboxy,项目名称:webmail-lite,代码行数:30,代码来源:Plugin.php

示例13: initialize

 function initialize(Server $server)
 {
     $this->server = $server;
     $server->subscribeEvent('beforeMethod', array($this, 'httpPostInterceptor'));
 }
开发者ID:musonic,项目名称:sabre-accounts,代码行数:5,代码来源:Plugin.php

示例14: initialize

 /**
  * Initializes the plugin
  *
  * @param DAV\Server $server
  * @return void
  */
 public function initialize(DAV\Server $server)
 {
     // Using a relatively low priority (200) to allow other extensions
     // to set the content-type first.
     $server->subscribeEvent('afterGetProperties', array($this, 'afterGetProperties'), 200);
 }
开发者ID:ChristophWurst,项目名称:pimcore,代码行数:12,代码来源:GuessContentType.php

示例15: initialize

 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $server->subscribeEvent('afterGetProperties', array($this, 'afterGetProperties'));
 }
开发者ID:sebbie42,项目名称:casebox,代码行数:6,代码来源:CustomPropertiesPlugin.php


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