當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。