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


PHP Sabre_DAV_Server::subscribeEvent方法代码示例

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


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

示例1: initialize

 /**
  * Initializes the plugin
  *
  * This method is automatically called by the Server class after addPlugin.
  * 
  * @param Sabre_DAV_Server $server 
  * @return void
  */
 public function initialize(Sabre_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:ngocanh,项目名称:pimcore,代码行数:15,代码来源:Plugin.php

示例2: initialize

 /**
  * Initializes the plugin and subscribes to events 
  * 
  * @param Sabre_DAV_Server $server 
  * @return void
  */
 public function initialize(Sabre_DAV_Server $server)
 {
     $this->server = $server;
     $this->server->subscribeEvent('beforeMethod', array($this, 'httpGetInterceptor'));
     if ($this->enablePost) {
         $this->server->subscribeEvent('unknownMethod', array($this, 'httpPOSTHandler'));
     }
 }
开发者ID:kumarsivarajan,项目名称:mollify,代码行数:14,代码来源:Plugin.php

示例3: 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';
     $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:omusico,项目名称:isle-web-framework,代码行数:20,代码来源:filesplugin.php

示例4: 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)
 {
     $this->server = $server;
     //$server->resourceTypeMapping['Sabre_CalDAV_IShareableCalendar'] = '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}shared-owner';
     $server->resourceTypeMapping['Sabre_CalDAV_ISharedCalendar'] = '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}shared';
     array_push($this->server->protectedProperties, '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}invite', '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}allowed-sharing-modes', '{' . Sabre_CalDAV_Plugin::NS_CALENDARSERVER . '}shared-url');
     $this->server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $this->server->subscribeEvent('afterGetProperties', array($this, 'afterGetProperties'));
     $this->server->subscribeEvent('updateProperties', array($this, 'updateProperties'));
     $this->server->subscribeEvent('unknownMethod', array($this, 'unknownMethod'));
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:22,代码来源:SharingPlugin.php

示例5: initialize

 /**
  * Initializes the plugin 
  *
  * @param Sabre_DAV_Server $server 
  * @return void 
  */
 public function initialize(Sabre_DAV_Server $server)
 {
     /* Events */
     $server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $server->subscribeEvent('report', array($this, 'report'));
     /* 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';
     $this->server = $server;
 }
开发者ID:Teino1978-Corp,项目名称:Teino1978-Corp-owncloud_.htaccess-,代码行数:21,代码来源:owncloud_3rdparty_Sabre_CardDAV_Plugin.php

示例6: initialize

 /**
  * Initializes the plugin
  *
  * Registers all required events and features.
  *
  * @param Sabre_DAV_Server $server
  * @return void
  */
 public function initialize(Sabre_DAV_Server $server)
 {
     $ns = '{' . Sabre_CalDAV_Plugin::NS_CALDAV . '}';
     $this->server = $server;
     $server->resourceTypeMapping['Sabre_CalDAV_Schedule_IOutbox'] = $ns . 'schedule-outbox';
     $server->resourceTypeMapping['Sabre_CalDAV_Schedule_IInbox'] = $ns . 'schedule-inbox';
     // This ensures that a users' addresses are all searchable.
     $aclPlugin = $this->server->getPlugin('acl');
     if (!$aclPlugin) {
         throw new Sabre_DAV_Exception('ACL plugin must be loaded for the Scheduling plugin to work. We\'re doooomed');
     }
     $server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $server->subscribeEvent('unknownMethod', array($this, 'unknownMethod'));
     // $server->subscribeEvent('afterBind',array($this,'afterBind'));
 }
开发者ID:rodrigofns,项目名称:ExpressoLivre3,代码行数:23,代码来源:Plugin.php

示例7: 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';
     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:rodrigofns,项目名称:ExpressoLivre3,代码行数:14,代码来源:PluginAutoSchedule.php

示例8: testUpdatePropertiesEventSuccess

 function testUpdatePropertiesEventSuccess()
 {
     $tree = array(new Sabre_DAV_SimpleDirectory('foo'));
     $server = new Sabre_DAV_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:rolwi,项目名称:koala,代码行数:9,代码来源:ServerUpdatePropertiesTest.php

示例9: initialize

 /**
  * Initializes the plugin
  *
  * @param Sabre_DAV_Server $server
  * @return void
  */
 public function initialize(Sabre_DAV_Server $server)
 {
     /* Events */
     $server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $server->subscribeEvent('updateProperties', array($this, 'updateProperties'));
     $server->subscribeEvent('report', array($this, 'report'));
     $server->subscribeEvent('onHTMLActionsPanel', array($this, 'htmlActionsPanel'));
     $server->subscribeEvent('onBrowserPostAction', array($this, 'browserPostAction'));
     /* 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:noci2012,项目名称:owncloud,代码行数:27,代码来源:Plugin.php

示例10: initialize

 /**
  * Initializes the plugin and subscribes to events
  *
  * @param Sabre_DAV_Server $server
  * @return void
  */
 public function initialize(Sabre_DAV_Server $server)
 {
     $this->server = $server;
     $this->server->subscribeEvent('beforeMethod', array($this, 'httpGetInterceptor'));
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:11,代码来源:MapGetToPropFind.php

示例11: 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)
 {
     $this->server = $server;
     $this->server->subscribeEvent('beforeMethod', array($this, 'checkMaintenanceMode'), 10);
 }
开发者ID:omusico,项目名称:isle-web-framework,代码行数:16,代码来源:maintenanceplugin.php

示例12: 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);
 }
开发者ID:ZerGabriel,项目名称:friendica-addons,代码行数:11,代码来源:ICSExportPlugin.php

示例13: initialize

 /**
  * Sets up the plugin
  *
  * This method is automatically called by the server class.
  * 
  * @param Sabre_DAV_Server $server 
  * @return void
  */
 public function initialize(Sabre_DAV_Server $server)
 {
     $this->server = $server;
     $server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $server->subscribeEvent('beforeMethod', array($this, 'beforeMethod'), 20);
     $server->subscribeEvent('beforeBind', array($this, 'beforeBind'), 20);
     $server->subscribeEvent('beforeUnbind', array($this, 'beforeUnbind'), 20);
     $server->subscribeEvent('updateProperties', array($this, 'updateProperties'));
     $server->subscribeEvent('beforeUnlock', array($this, 'beforeUnlock'), 20);
     $server->subscribeEvent('report', array($this, 'report'));
     $server->subscribeEvent('unknownMethod', array($this, 'unknownMethod'));
     array_push($server->protectedProperties, '{DAV:}alternate-URI-set', '{DAV:}principal-URL', '{DAV:}group-membership', '{DAV:}principal-collection-set', '{DAV:}current-user-principal', '{DAV:}supported-privilege-set', '{DAV:}current-user-privilege-set', '{DAV:}acl', '{DAV:}acl-restrictions', '{DAV:}inherited-acl-set', '{DAV:}owner', '{DAV:}group');
     // Automatically mapping nodes implementing IPrincipal to the
     // {DAV:}principal resourcetype.
     $server->resourceTypeMapping['Sabre_DAVACL_IPrincipal'] = '{DAV:}principal';
     // Mapping the group-member-set property to the HrefList property
     // class.
     $server->propertyMap['{DAV:}group-member-set'] = 'Sabre_DAV_Property_HrefList';
 }
开发者ID:nyarla,项目名称:fluxflex-sample,代码行数:27,代码来源:Plugin.php

示例14: initialize

 /**
  * Initializes the plugin
  *
  * @param Sabre_DAV_Server $server
  * @return void
  */
 public function initialize(Sabre_DAV_Server $server)
 {
     $this->server = $server;
     $server->subscribeEvent('unknownMethod', array($this, 'unknownMethod'));
     //$server->subscribeEvent('unknownMethod',array($this,'unknownMethod2'),1000);
     $server->subscribeEvent('report', array($this, 'report'));
     $server->subscribeEvent('beforeGetProperties', array($this, 'beforeGetProperties'));
     $server->subscribeEvent('onHTMLActionsPanel', array($this, 'htmlActionsPanel'));
     $server->subscribeEvent('onBrowserPostAction', array($this, 'browserPostAction'));
     $server->subscribeEvent('beforeWriteContent', array($this, 'beforeWriteContent'));
     $server->subscribeEvent('beforeCreateFile', array($this, 'beforeCreateFile'));
     $server->xmlNamespaces[self::NS_CALDAV] = 'cal';
     $server->xmlNamespaces[self::NS_CALENDARSERVER] = 'cs';
     $server->propertyMap['{' . self::NS_CALDAV . '}supported-calendar-component-set'] = 'Sabre_CalDAV_Property_SupportedCalendarComponentSet';
     $server->resourceTypeMapping['Sabre_CalDAV_ICalendar'] = '{urn:ietf:params:xml:ns:caldav}calendar';
     $server->resourceTypeMapping['Sabre_CalDAV_Schedule_IOutbox'] = '{urn:ietf:params:xml:ns:caldav}schedule-outbox';
     $server->resourceTypeMapping['Sabre_CalDAV_Principal_ProxyRead'] = '{http://calendarserver.org/ns/}calendar-proxy-read';
     $server->resourceTypeMapping['Sabre_CalDAV_Principal_ProxyWrite'] = '{http://calendarserver.org/ns/}calendar-proxy-write';
     array_push($server->protectedProperties, '{' . self::NS_CALDAV . '}supported-calendar-component-set', '{' . self::NS_CALDAV . '}supported-calendar-data', '{' . self::NS_CALDAV . '}max-resource-size', '{' . self::NS_CALDAV . '}min-date-time', '{' . self::NS_CALDAV . '}max-date-time', '{' . self::NS_CALDAV . '}max-instances', '{' . self::NS_CALDAV . '}max-attendees-per-instance', '{' . self::NS_CALDAV . '}calendar-home-set', '{' . self::NS_CALDAV . '}supported-collation-set', '{' . self::NS_CALDAV . '}calendar-data', '{' . self::NS_CALDAV . '}schedule-inbox-URL', '{' . self::NS_CALDAV . '}schedule-outbox-URL', '{' . self::NS_CALDAV . '}calendar-user-address-set', '{' . self::NS_CALDAV . '}calendar-user-type', '{' . self::NS_CALENDARSERVER . '}getctag', '{' . self::NS_CALENDARSERVER . '}calendar-proxy-read-for', '{' . self::NS_CALENDARSERVER . '}calendar-proxy-write-for');
 }
开发者ID:robhell,项目名称:friendica-addons,代码行数:26,代码来源:Plugin.php

示例15: initialize

 /**
  * Initializes the plugin 
  * 
  * @param Sabre_DAV_Server $server 
  * @return void
  */
 public function initialize(Sabre_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:mover5,项目名称:imobackup,代码行数:12,代码来源:GuessContentType.php


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