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


PHP Route::setAction方法代码示例

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


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

示例1: mergeGroupAttributesIntoRoute

 /**
  * Merge the group stack with the controller action.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @return void
  */
 protected function mergeGroupAttributesIntoRoute($route)
 {
     $action = $this->mergeWithLastGroup($route->getAction());
     $route->setAction($action);
 }
开发者ID:samlev,项目名称:framework,代码行数:11,代码来源:Router.php

示例2: addApiRoute

 /**
  * Add a new route to an API collection.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @return \Illuminate\Routing\Route
  */
 protected function addApiRoute($route)
 {
     // Since the groups action gets merged with the routes we need to make
     // sure that if the route supplied its own protection that we grab
     // that protection status from the array after the merge.
     $action = $route->getAction();
     if (count($this->groupStack) > 0 and isset($action['protected'])) {
         $action['protected'] = is_array($action['protected']) ? last($action['protected']) : $action['protected'];
         $route->setAction($action);
     }
     $versions = array_get(last($this->groupStack), 'version', []);
     foreach ($versions as $version) {
         if ($collection = $this->getApiRouteCollection($version)) {
             $collection->add($route);
         }
     }
     return $route;
 }
开发者ID:iwillhappy1314,项目名称:laravel-admin,代码行数:24,代码来源:Router.php

示例3: mergeController

 /**
  * Merge the group stack with the controller action.
  *
  * @param  \Illuminate\Routing\Route  $route
  * @return void
  */
 protected function mergeController($route)
 {
     $action = $this->mergeWithLastGroup($route->getAction());
     $route->setAction($action);
 }
开发者ID:GeorgeBroadley,项目名称:caffeine-vendor,代码行数:11,代码来源:Router.php

示例4: setAction

 /**
  * {@inheritDoc}
  */
 public function setAction(array $action)
 {
     $action = static::parseAction($action);
     return parent::setAction($action);
 }
开发者ID:jacobDaeHyung,项目名称:api,代码行数:8,代码来源:Route.php


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