當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Application::bindPluginRoutes方法代碼示例

本文整理匯總了PHP中Alchemy\Phrasea\Application::bindPluginRoutes方法的典型用法代碼示例。如果您正苦於以下問題:PHP Application::bindPluginRoutes方法的具體用法?PHP Application::bindPluginRoutes怎麽用?PHP Application::bindPluginRoutes使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Alchemy\Phrasea\Application的用法示例。


在下文中一共展示了Application::bindPluginRoutes方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: array

     return Result::create($request, ['name' => $app['conf']->get(['registry', 'general', 'title']), 'type' => 'phraseanet', 'description' => $app['conf']->get(['registry', 'general', 'description']), 'documentation' => 'https://docs.phraseanet.com/Devel', 'versions' => ['1' => ['number' => V1::VERSION, 'uri' => '/api/v1/', 'authenticationProtocol' => 'OAuth2', 'authenticationVersion' => 'draft#v9', 'authenticationEndPoints' => ['authorization_token' => '/api/oauthv2/authorize', 'access_token' => '/api/oauthv2/token']]]])->createResponse();
 });
 // Fake routes required to send emails. Sorry.
 $routes = array('root' => '/', 'admin' => '/admin/');
 foreach ($routes as $name => $route) {
     $app->get($route, function () {
         return '';
     })->bind($name);
 }
 $app->mount('/api/oauthv2', new OAuth2());
 $app->mount('/datafiles/', new Datafiles());
 $app->mount('/api/v1', new V1());
 $app->mount('/permalink/', new Permalink());
 $app->mount($app['controller.media_accessor.route_prefix'], new MediaAccessor());
 $app->mount('/include/minify/', new Minifier());
 $app->bindPluginRoutes('plugin.controller_providers.api');
 if (PhraseaApplication::ENV_DEV === $app->getEnvironment()) {
     $app->register($p = new WebProfilerServiceProvider(), ['profiler.cache_dir' => $app['cache.path'] . '/profiler']);
     $app->mount('/_profiler', $p);
     if ($app['phraseanet.configuration-tester']->isInstalled()) {
         $app->register(new DoctrineProfilerServiceProvider());
         $app['db'] = $app->share(function (PhraseaApplication $app) {
             return $app['orm.em']->getConnection();
         });
     }
 }
 $app['dispatcher'] = $app->share($app->extend('dispatcher', function (EventDispatcherInterface $dispatcher, PhraseaApplication $app) {
     $dispatcher->addSubscriber(new ApiOauth2ErrorsSubscriber($app['phraseanet.exception_handler'], $app['translator']));
     return $dispatcher;
 }));
 $app->after(function (Request $request, Response $response) use($app) {
開發者ID:luisbrito,項目名稱:Phraseanet,代碼行數:31,代碼來源:Api.php


注:本文中的Alchemy\Phrasea\Application::bindPluginRoutes方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。