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


PHP Server::on方法代码示例

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


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

示例1: 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 Server $server
  * @return void
  */
 function initialize(Server $server)
 {
     $this->server = $server;
     $server->resourceTypeMapping['OCA\\DAV\\CardDAV\\ISharedAddressbook'] = '{' . \Sabre\CardDAV\Plugin::NS_CARDDAV . '}shared';
     $this->server->xml->elementMap['{' . \Sabre\CardDAV\Plugin::NS_CARDDAV . '}share'] = 'OCA\\DAV\\CardDAV\\Sharing\\Xml\\ShareRequest';
     $this->server->on('method:POST', [$this, 'httpPost']);
 }
开发者ID:gmurayama,项目名称:core,代码行数:18,代码来源:plugin.php

示例2: 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 Server $server
  * @return void
  */
 function initialize(Server $server)
 {
     $server->on('propFind', [$this, 'propFind'], 130);
     $server->on('propPatch', [$this, 'propPatch'], 300);
     $server->on('afterMove', [$this, 'afterMove']);
     $server->on('afterUnbind', [$this, 'afterUnbind']);
 }
开发者ID:MetallianFR68,项目名称:myroundcube,代码行数:18,代码来源:Plugin.php

示例3: initialize

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

示例4: initialize

 /** {@inheritDoc} */
 public function initialize(\Sabre\DAV\Server $server)
 {
     $this->server = $server;
     $this->server->on('method:LOCK', [$this, 'fakeLockProvider'], 1);
     $this->server->on('method:UNLOCK', [$this, 'fakeUnlockProvider'], 1);
     $server->on('propFind', [$this, 'propFind']);
     $server->on('validateTokens', [$this, 'validateTokens']);
 }
开发者ID:stweil,项目名称:owncloud-core,代码行数:9,代码来源:fakelockerplugin.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->on('propFind', array($this, 'handleGetProperties'));
     $this->server->on('propPatch', array($this, 'handleUpdateProperties'));
 }
开发者ID:Kevin-ZK,项目名称:vaneDisk,代码行数:19,代码来源: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->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc';
     $server->protectedProperties[] = self::ID_PROPERTYNAME;
     $server->on('propFind', array($this, 'handleGetProperties'));
     $server->on('propPatch', array($this, 'handleUpdateProperties'));
     $server->on('method:POST', [$this, 'httpPost']);
     $this->server = $server;
 }
开发者ID:RomanKreisel,项目名称:core,代码行数:20,代码来源:systemtagplugin.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->on('beforeMethod', [$this, 'beforeMethod'], 5);
     $this->server->on('unknownMethod', [$this, 'unknownMethod'], 5);
     $this->server->on('report', [$this, 'report'], 5);
     $this->server->on('beforeGetProperties', [$this, 'beforeGetProperties'], 5);
     $this->log(2, 'Initialized plugin. Request time ' . $this->startTime . ' (' . date(\DateTime::RFC2822, $this->startTime) . '). Version: ' . \Sabre\DAV\Version::VERSION);
 }
开发者ID:CatoTH,项目名称:Muenchen-Transparent,代码行数:15,代码来源:TermineCalDAVDebug.php

示例8: initialize

 /**
  * Initializes the plugin
  *
  * This method is automatically called by the Server class after addPlugin.
  *
  * @param DAV\Server $server
  * @return void
  */
 function initialize(DAV\Server $server)
 {
     $this->server = $server;
     $server->on('method:LOCK', [$this, 'httpLock']);
     $server->on('method:UNLOCK', [$this, 'httpUnlock']);
     $server->on('validateTokens', [$this, 'validateTokens']);
     $server->on('propFind', [$this, 'propFind']);
     $server->on('afterUnbind', [$this, 'afterUnbind']);
 }
开发者ID:bogolubov,项目名称:owncollab_talks-1,代码行数:17,代码来源:Plugin.php

示例9: 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 Server $server
  * @return void
  */
 function initialize(Server $server)
 {
     $this->server = $server;
     $server->on('method:GET', [$this, 'httpGet'], 90);
     $server->on('propFind', [$this, 'propFind']);
     $server->xmlNamespaces[self::NS_CALENDARSERVER] = 'cs';
     $server->resourceTypeMapping['\\Sabre\\CalDAV\\Notifications\\ICollection'] = '{' . self::NS_CALENDARSERVER . '}notification';
     array_push($server->protectedProperties, '{' . self::NS_CALENDARSERVER . '}notification-URL', '{' . self::NS_CALENDARSERVER . '}notificationtype');
 }
开发者ID:MetallianFR68,项目名称:myroundcube,代码行数:20,代码来源:Plugin.php

示例10: initialize

 /**
  * Initializes the plugin
  *
  * This method is automatically called by the Server class after addPlugin.
  *
  * @param DAV\Server $server
  * @return void
  */
 function initialize(DAV\Server $server)
 {
     $this->server = $server;
     $this->server->xml->elementMap['{DAV:}lockinfo'] = 'Sabre\\DAV\\Xml\\Request\\Lock';
     $server->on('method:LOCK', [$this, 'httpLock']);
     $server->on('method:UNLOCK', [$this, 'httpUnlock']);
     $server->on('validateTokens', [$this, 'validateTokens']);
     $server->on('propFind', [$this, 'propFind']);
     $server->on('afterUnbind', [$this, 'afterUnbind']);
 }
开发者ID:BlaBlaNet,项目名称:hubzilla,代码行数:18,代码来源:Plugin.php

示例11: initialize

 /**
  * Initializes the plugin and registers event handlers
  *
  * @param \Sabre\DAV\Server $server
  * @return void
  */
 function initialize(DAV\Server $server)
 {
     $this->server = $server;
     $server->on('method:GET', [$this, 'httpGet'], 90);
     $server->on('browserButtonActions', function ($path, $node, &$actions) {
         if ($node instanceof ICalendar) {
             $actions .= '<a href="' . htmlspecialchars($path, ENT_QUOTES, 'UTF-8') . '?export"><span class="oi" data-glyph="calendar"></span></a>';
         }
     });
 }
开发者ID:pageer,项目名称:sabre-dav,代码行数:16,代码来源:ICSExportPlugin.php

示例12: initialize

 /**
  * Initializes the plugin
  *
  * @param DAV\Server $server
  * @return void
  */
 function initialize(DAV\Server $server)
 {
     /* Events */
     $server->on('propFind', [$this, 'propFindEarly']);
     $server->on('propFind', [$this, 'propFindLate'], 150);
     $server->on('propPatch', [$this, 'propPatch']);
     $server->on('report', [$this, 'report']);
     $server->on('onHTMLActionsPanel', [$this, 'htmlActionsPanel']);
     $server->on('onBrowserPostAction', [$this, 'browserPostAction']);
     $server->on('beforeWriteContent', [$this, 'beforeWriteContent']);
     $server->on('beforeCreateFile', [$this, 'beforeCreateFile']);
     $server->on('afterMethod:GET', [$this, 'httpAfterGet']);
     /* 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:samj1912,项目名称:repo,代码行数:31,代码来源:Plugin.php

示例13: 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 Server $server
  * @return void
  */
 function initialize(Server $server)
 {
     $this->server = $server;
     if (strpos($this->server->getRequestUri(), 'comments/') !== 0) {
         return;
     }
     $this->server->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc';
     $this->server->xml->classMap['DateTime'] = function (Writer $writer, \DateTime $value) {
         $writer->write($value->format('Y-m-d H:m:i'));
     };
     $this->server->on('report', [$this, 'onReport']);
     $this->server->on('method:POST', [$this, 'httpPost']);
 }
开发者ID:matt407,项目名称:core,代码行数:24,代码来源:commentsplugin.php

示例14: initialize

 /**
  * Initializes the plugin.
  *
  * This is when the plugin registers it's hooks.
  *
  * @param DAV\Server $server
  * @return void
  */
 function initialize(DAV\Server $server)
 {
     $this->server = $server;
     $self = $this;
     $server->on('report', function ($reportName, $dom, $uri) use($self) {
         if ($reportName === '{DAV:}sync-collection') {
             $this->server->transactionType = 'report-sync-collection';
             $self->syncCollection($uri, $dom);
             return false;
         }
     });
     $server->on('propFind', [$this, 'propFind']);
     $server->on('validateTokens', [$this, 'validateTokens']);
 }
开发者ID:enoch85,项目名称:owncloud-testserver,代码行数:22,代码来源:Plugin.php

示例15: 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->xml->namespaceMap[self::NS_OWNCLOUD] = 'oc';
     $server->protectedProperties[] = self::FILEID_PROPERTYNAME;
     $server->protectedProperties[] = self::INTERNAL_FILEID_PROPERTYNAME;
     $server->protectedProperties[] = self::PERMISSIONS_PROPERTYNAME;
     $server->protectedProperties[] = self::SHARE_PERMISSIONS_PROPERTYNAME;
     $server->protectedProperties[] = self::SIZE_PROPERTYNAME;
     $server->protectedProperties[] = self::DOWNLOADURL_PROPERTYNAME;
     $server->protectedProperties[] = self::OWNER_ID_PROPERTYNAME;
     $server->protectedProperties[] = self::OWNER_DISPLAY_NAME_PROPERTYNAME;
     $server->protectedProperties[] = self::CHECKSUMS_PROPERTYNAME;
     $server->protectedProperties[] = self::DATA_FINGERPRINT_PROPERTYNAME;
     // normally these cannot be changed (RFC4918), but we want them modifiable through PROPPATCH
     $allowedProperties = ['{DAV:}getetag'];
     $server->protectedProperties = array_diff($server->protectedProperties, $allowedProperties);
     $this->server = $server;
     $this->server->on('propFind', array($this, 'handleGetProperties'));
     $this->server->on('propPatch', array($this, 'handleUpdateProperties'));
     $this->server->on('afterBind', array($this, 'sendFileIdHeader'));
     $this->server->on('afterWriteContent', array($this, 'sendFileIdHeader'));
     $this->server->on('afterMethod:GET', [$this, 'httpGet']);
     $this->server->on('afterMethod:GET', array($this, 'handleDownloadToken'));
     $this->server->on('afterResponse', function ($request, ResponseInterface $response) {
         $body = $response->getBody();
         if (is_resource($body)) {
             fclose($body);
         }
     });
     $this->server->on('beforeMove', [$this, 'checkMove']);
 }
开发者ID:GitHubUser4234,项目名称:core,代码行数:42,代码来源:FilesPlugin.php


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