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


PHP Route::domain方法代码示例

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


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

示例1: addToCollections

 /**
  * Add the given route to the arrays of routes.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @return void
  */
 protected function addToCollections($route)
 {
     foreach ($route->methods() as $method) {
         $this->routes[$method][$route->domain() . $route->getUri()] = $route;
     }
     $this->allRoutes[$method . $route->domain() . $route->getUri()] = $route;
 }
开发者ID:ahumellihuk,项目名称:blogging-platform,代码行数:13,代码来源:RouteCollection.php

示例2: getRouteInformation

 /**
  * Get the route information for a given route.
  *
  * @param $route \Illuminate\Routing\Route
  * @param $filter string
  * @param $namespace string
  *
  * @return array
  */
 protected function getRouteInformation(Route $route, $filter, $namespace)
 {
     $host = $route->domain();
     $methods = $route->getMethods();
     $uri = $route->uri();
     $name = $route->getName();
     $action = $route->getActionName();
     $jsroute = array_get($route->getAction(), 'jsroute', null);
     if (!empty($namespace)) {
         $a = $route->getAction();
         if (isset($a['controller'])) {
             $action = str_replace($namespace . '\\', '', $action);
         }
     }
     switch ($filter) {
         case 'all':
             if ($jsroute === false) {
                 return null;
             }
             break;
         case 'only':
             if ($jsroute !== true) {
                 return null;
             }
             break;
     }
     return compact('host', 'methods', 'uri', 'name', 'action');
 }
开发者ID:jeylabs,项目名称:jsroute,代码行数:37,代码来源:Collection.php

示例3: addToCollections

 /**
  * Add the given route to the arrays of routes.
  *
  * @param  \Illuminate\Routing\Route $route
  * @return void
  */
 protected function addToCollections($route)
 {
     $domainAndUri = $route->domain() . $route->getUri() . $route->getPriority();
     foreach ($route->methods() as $method) {
         $this->routes[$method][$domainAndUri] = $route;
     }
     $this->allRoutes[$method . $domainAndUri] = $route;
 }
开发者ID:langaner,项目名称:route-priority,代码行数:14,代码来源:RouteCollection.php

示例4: getRouteDomain

 /**
  * Get the formatted domain for a given route.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @param  array  $parameters
  * @return string
  */
 protected function getRouteDomain($route, &$parameters)
 {
     return $route->domain() ? $this->formatDomain($route, $parameters) : null;
 }
开发者ID:hilmysyarif,项目名称:sisfito,代码行数:11,代码来源:UrlGenerator.php

示例5: getRouteInformation

 /**
  * Get the route information for a given route.
  *
  * @param  string  $name
  * @param  \Illuminate\Routing\Route  $route
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     $uri = implode('|', $route->methods()) . ' ' . $route->uri();
     return $this->filterRoute(array('host' => $route->domain(), 'uri' => $uri, 'name' => $route->getName(), 'action' => $route->getActionName(), 'before' => $this->getBeforeFilters($route), 'after' => $this->getAfterFilters($route)));
 }
开发者ID:mawaha,项目名称:tracker,代码行数:12,代码来源:RoutesCommand.php

示例6: getRouteInformation

 /**
  * Get the route information for a given route.
  *
  * @param  string  $name
  * @param  \Symfony\Component\Routing\Route  $route
  * @return array
  */
 protected function getRouteInformation($name, Route $route)
 {
     $uri = head($route->methods()) . ' ' . $route->uri();
     return array('host' => (string) $route->domain(), 'method' => (string) $this->getMethod($uri), 'uri' => (string) $uri, 'name' => (string) $route->getName(), 'action' => (string) $route->getActionName(), 'before' => (string) $this->getBeforeFilters($route), 'after' => (string) $this->getAfterFilters($route));
 }
开发者ID:leitom,项目名称:role,代码行数:12,代码来源:RouteScanner.php

示例7: getRouteInformation

 /**
  * Get the route information for a given route.
  *
  * @param \Illuminate\Routing\Route $route        	
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     return $this->filterRoute(['host' => $route->domain(), 'method' => implode('|', $route->methods()), 'uri' => $route->uri(), 'name' => $route->getName(), 'action' => $route->getActionName(), 'middleware' => $this->getMiddleware($route)]);
 }
开发者ID:ngitimfoyo,项目名称:Nyari-AppPHP,代码行数:10,代码来源:RouteListCommand.php

示例8: getRouteInformation

 /**
  * Get the route information for a given route.
  *
  * @param \Illuminate\Routing\Route $route
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     return $this->filterRoute(array('host' => $route->domain(), 'uri' => implode('|', $route->methods()) . ' ' . $route->uri(), 'name' => $route->getName(), 'action' => $route->getActionName(), 'version' => implode(', ', array_get($route->getAction(), 'version')), 'protected' => array_get($route->getAction(), 'protected') ? 'Yes' : 'No', 'scopes' => $this->getScopes($route)));
 }
开发者ID:andymrussell,项目名称:api,代码行数:10,代码来源:ApiRoutesCommand.php

示例9: getDomainAndScheme

 /**
  * Get the domain and schee for the route.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @return string
  */
 protected function getDomainAndScheme($route)
 {
     return $this->getScheme($route->secure()) . $route->domain();
 }
开发者ID:yashb,项目名称:generator,代码行数:10,代码来源:UrlGenerator.php

示例10: getRouteInformation

 /**
  * Get the route information for a given route.
  *
  * @param  string  $name
  * @param  \Illuminate\Routing\Route  $route
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     $uri = implode('|', $route->methods()) . ' ' . $route->uri();
     return $this->filterRoute(array('host' => $route->domain(), 'uri' => $uri, 'name' => $route->getName(), 'action' => $route->getActionName(), 'prefix' => $route->getPrefix(), 'method' => $route->methods()[0]));
 }
开发者ID:f2m2,项目名称:apidocs,代码行数:12,代码来源:ApiDocsGenerator.php

示例11: getRouteInformation

 /**
  * Get the route information for a given route.
  *
  * @param  \Illuminate\Routing\Route $route
  * @return array
  */
 protected function getRouteInformation(Route $route)
 {
     list($controller, $action) = explode("@", $route->getActionName());
     return ['host' => $route->domain(), 'method' => implode('|', $route->methods()), 'uri' => $route->uri(), 'name' => $route->getName(), 'controller' => $controller, 'action' => $action, 'resource' => $route->getActionName(), 'middleware' => Collection::make($this->getMiddleware($route))];
 }
开发者ID:aginev,项目名称:acl,代码行数:11,代码来源:RouteList.php

示例12: toArray

 /**
  * @return array
  */
 public function toArray()
 {
     return array_merge(['name' => $this->route->getName(), 'methods' => $this->route->getMethods(), 'domain' => $this->route->domain(), 'path' => $this->preparePath(), 'action' => $this->route->getAction(), 'wheres' => $this->extractWheres(), 'errors' => $this->errors], $this->getMeta(), $this->options);
 }
开发者ID:asvae,项目名称:laravel-api-tester,代码行数:7,代码来源:RouteInfo.php

示例13: getRouteInformation

 protected function getRouteInformation(Route $route, $current)
 {
     $uri = implode(' | ', $route->methods()) . ' <a href="' . $this->url->to($route->uri()) . '">' . $route->uri() . '</a>';
     return array('current' => $current == $route, 'host' => $route->domain(), 'uri' => $uri, 'name' => $route->getName(), 'action' => $route->getActionName(), 'before' => $this->getBeforeFilters($route), 'after' => $this->getAfterFilters($route));
 }
开发者ID:onigoetz,项目名称:profiler,代码行数:5,代码来源:Router41DataCollector.php


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