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


PHP IRequest::getRequestUri方法代码示例

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


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

示例1: __construct

 public function __construct(IRequest $request, $baseUri)
 {
     $this->request = $request;
     $this->baseUri = $baseUri;
     $root = new RootCollection();
     $this->server = new \OCA\DAV\Connector\Sabre\Server($root);
     // Backends
     $authBackend = new Auth(\OC::$server->getSession(), \OC::$server->getUserSession());
     // Set URL explicitly due to reverse-proxy situations
     $this->server->httpRequest->setUrl($this->request->getRequestUri());
     $this->server->setBaseUri($this->baseUri);
     $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig()));
     $this->server->addPlugin(new Plugin($authBackend, 'ownCloud'));
     $this->server->addPlugin(new \Sabre\DAVACL\Plugin());
     $this->server->addPlugin(new \Sabre\CardDAV\Plugin());
     // Finder on OS X requires Class 2 WebDAV support (locking), since we do
     // not provide locking we emulate it using a fake locking plugin.
     if ($request->isUserAgent(['/WebDAVFS/'])) {
         $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin());
     }
     // wait with registering these until auth is handled and the filesystem is setup
     $this->server->on('beforeMethod', function () {
         // custom properties plugin must be the last one
         $user = \OC::$server->getUserSession()->getUser();
         if (!is_null($user)) {
             $this->server->addPlugin(new \Sabre\DAV\PropertyStorage\Plugin(new CustomPropertiesBackend($this->server->tree, \OC::$server->getDatabaseConnection(), \OC::$server->getUserSession()->getUser())));
         }
     });
 }
开发者ID:quality123,项目名称:core,代码行数:29,代码来源:server.php

示例2: __construct

 public function __construct(IRequest $request, $baseUri)
 {
     $this->request = $request;
     $this->baseUri = $baseUri;
     $logger = \OC::$server->getLogger();
     $mailer = \OC::$server->getMailer();
     $dispatcher = \OC::$server->getEventDispatcher();
     $root = new RootCollection();
     $this->server = new \OCA\DAV\Connector\Sabre\Server($root);
     // Backends
     $authBackend = new Auth(\OC::$server->getSession(), \OC::$server->getUserSession(), \OC::$server->getRequest());
     // Set URL explicitly due to reverse-proxy situations
     $this->server->httpRequest->setUrl($this->request->getRequestUri());
     $this->server->setBaseUri($this->baseUri);
     $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig()));
     $authPlugin = new Plugin($authBackend, 'ownCloud');
     $this->server->addPlugin($authPlugin);
     // allow setup of additional auth backends
     $event = new SabrePluginEvent($this->server);
     $dispatcher->dispatch('OCA\\DAV\\Connector\\Sabre::authInit', $event);
     $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\DummyGetResponsePlugin());
     $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger));
     $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin());
     $this->server->addPlugin(new \Sabre\DAV\Sync\Plugin());
     // acl
     $acl = new DavAclPlugin();
     $acl->defaultUsernamePath = 'principals/users';
     $this->server->addPlugin($acl);
     // calendar plugins
     $this->server->addPlugin(new \Sabre\CalDAV\Plugin());
     $this->server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
     $this->server->addPlugin(new \Sabre\CalDAV\Schedule\Plugin());
     $this->server->addPlugin(new IMipPlugin($mailer, $logger));
     $this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin());
     $this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin());
     $this->server->addPlugin(new DAV\Sharing\Plugin($authBackend, \OC::$server->getRequest()));
     // addressbook plugins
     $this->server->addPlugin(new \OCA\DAV\CardDAV\Plugin());
     // system tags plugins
     $this->server->addPlugin(new \OCA\DAV\SystemTag\SystemTagPlugin(\OC::$server->getSystemTagManager(), \OC::$server->getGroupManager(), \OC::$server->getUserSession()));
     // comments plugin
     $this->server->addPlugin(new \OCA\DAV\Comments\CommentsPlugin(\OC::$server->getCommentsManager(), \OC::$server->getUserSession()));
     // Some WebDAV clients do require Class 2 WebDAV support (locking), since
     // we do not provide locking we emulate it using a fake locking plugin.
     if ($request->isUserAgent(['/WebDAVFS/', '/Microsoft Office OneNote 2013/'])) {
         $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin());
     }
     // wait with registering these until auth is handled and the filesystem is setup
     $this->server->on('beforeMethod', function () {
         // custom properties plugin must be the last one
         $user = \OC::$server->getUserSession()->getUser();
         if (!is_null($user)) {
             $view = \OC\Files\Filesystem::getView();
             $this->server->addPlugin(new FilesPlugin($this->server->tree, $view));
             $this->server->addPlugin(new \Sabre\DAV\PropertyStorage\Plugin(new CustomPropertiesBackend($this->server->tree, \OC::$server->getDatabaseConnection(), \OC::$server->getUserSession()->getUser())));
         }
     });
 }
开发者ID:gvde,项目名称:core,代码行数:58,代码来源:server.php

示例3: __construct

 public function __construct(IRequest $request, $baseUri)
 {
     $this->request = $request;
     $this->baseUri = $baseUri;
     $logger = \OC::$server->getLogger();
     $dispatcher = \OC::$server->getEventDispatcher();
     $root = new RootCollection();
     $this->server = new \OCA\DAV\Connector\Sabre\Server($root);
     // Backends
     $authBackend = new Auth(\OC::$server->getSession(), \OC::$server->getUserSession());
     // Set URL explicitly due to reverse-proxy situations
     $this->server->httpRequest->setUrl($this->request->getRequestUri());
     $this->server->setBaseUri($this->baseUri);
     $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig()));
     $this->server->addPlugin(new Plugin($authBackend, 'ownCloud'));
     $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\DummyGetResponsePlugin());
     $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ExceptionLoggerPlugin('webdav', $logger));
     $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\LockPlugin());
     $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\ListenerPlugin($dispatcher));
     $this->server->addPlugin(new \Sabre\DAV\Sync\Plugin());
     // acl
     $acl = new \Sabre\DAVACL\Plugin();
     $acl->defaultUsernamePath = 'principals/users';
     $this->server->addPlugin($acl);
     // calendar plugins
     $this->server->addPlugin(new \Sabre\CalDAV\Plugin());
     $this->server->addPlugin(new \Sabre\CalDAV\ICSExportPlugin());
     $senderEmail = \OCP\Util::getDefaultEmailAddress('no-reply');
     $this->server->addPlugin(new \Sabre\CalDAV\Schedule\Plugin());
     $this->server->addPlugin(new \Sabre\CalDAV\Schedule\IMipPlugin($senderEmail));
     $this->server->addPlugin(new \Sabre\CalDAV\SharingPlugin());
     $this->server->addPlugin(new \Sabre\CalDAV\Subscriptions\Plugin());
     $this->server->addPlugin(new \Sabre\CalDAV\Notifications\Plugin());
     $this->server->addPlugin(new CardDAV\Sharing\Plugin($authBackend, \OC::$server->getRequest()));
     // addressbook plugins
     $this->server->addPlugin(new \OCA\DAV\CardDAV\Plugin());
     // system tags plugins
     $this->server->addPlugin(new \OCA\DAV\SystemTag\SystemTagPlugin(\OC::$server->getSystemTagManager()));
     // Finder on OS X requires Class 2 WebDAV support (locking), since we do
     // not provide locking we emulate it using a fake locking plugin.
     if ($request->isUserAgent(['/WebDAVFS/'])) {
         $this->server->addPlugin(new \OCA\DAV\Connector\Sabre\FakeLockerPlugin());
     }
     // wait with registering these until auth is handled and the filesystem is setup
     $this->server->on('beforeMethod', function () {
         // custom properties plugin must be the last one
         $user = \OC::$server->getUserSession()->getUser();
         if (!is_null($user)) {
             $this->server->addPlugin(new \Sabre\DAV\PropertyStorage\Plugin(new CustomPropertiesBackend($this->server->tree, \OC::$server->getDatabaseConnection(), \OC::$server->getUserSession()->getUser())));
         }
     });
 }
开发者ID:loulancn,项目名称:core,代码行数:52,代码来源:server.php

示例4: __construct

 public function __construct(IRequest $request, $baseUri)
 {
     $this->request = $request;
     $this->baseUri = $baseUri;
     $root = new RootCollection();
     $this->server = new \OCA\DAV\Connector\Sabre\Server($root);
     // Backends
     $authBackend = new Auth(\OC::$server->getSession(), \OC::$server->getUserSession());
     // Set URL explicitly due to reverse-proxy situations
     $this->server->httpRequest->setUrl($this->request->getRequestUri());
     $this->server->setBaseUri($this->baseUri);
     $this->server->addPlugin(new BlockLegacyClientPlugin(\OC::$server->getConfig()));
     $this->server->addPlugin(new Plugin($authBackend, 'ownCloud'));
     // wait with registering these until auth is handled and the filesystem is setup
     $this->server->on('beforeMethod', function () {
         // custom properties plugin must be the last one
         $user = \OC::$server->getUserSession()->getUser();
         if (!is_null($user)) {
             $this->server->addPlugin(new \Sabre\DAV\PropertyStorage\Plugin(new CustomPropertiesBackend($this->server->tree, \OC::$server->getDatabaseConnection(), \OC::$server->getUserSession()->getUser())));
         }
     });
 }
开发者ID:nem0xff,项目名称:core,代码行数:22,代码来源:server.php


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