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


PHP Bundle::prefix方法代码示例

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


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

示例1: filters

 /**
  * Get the filters that are attached to the route for a given event.
  *
  * @param  string  $event
  * @return array
  */
 protected function filters($event)
 {
     $global = Bundle::prefix($this->bundle) . $event;
     $filters = array_unique(array($event, $global));
     // Next we will check to see if there are any filters attached to
     // the route for the given event. If there are, we'll merge them
     // in with the global filters for the event.
     if (isset($this->action[$event])) {
         $assigned = Filter::parse($this->action[$event]);
         $filters = array_merge($filters, $assigned);
     }
     // Next we will attach any pattern type filters to the array of
     // filters as these are matched to the route by the route's
     // URI and not explicitly attached to routes.
     if ($event == 'before') {
         $filters = array_merge($filters, $this->patterns());
     }
     return array(new Filter_Collection($filters));
 }
开发者ID:nenoraith,项目名称:sowcomposer,代码行数:25,代码来源:route.php

示例2: filters

 /**
  * Get the filters that are attached to the route for a given event.
  *
  * @param  string  $event
  * @return array
  */
 protected function filters($event)
 {
     $global = Bundle::prefix($this->bundle) . $event;
     $filters = array_unique(array($event, $global));
     // Next we will check to see if there are any filters attached to
     // the route for the given event. If there are, we'll merge them
     // in with the global filters for the event.
     if (isset($this->action[$event])) {
         $assigned = Filter::parse($this->action[$event]);
         $filters = array_merge($filters, $assigned);
     }
     return array(new Filter_Collection($filters));
 }
开发者ID:bamper,项目名称:laravel.com,代码行数:19,代码来源:route.php

示例3: attribute

 /**
  * Get the displayable name for a given attribute.
  *
  * @param  string  $attribute
  * @return string
  */
 protected function attribute($attribute)
 {
     $bundle = Bundle::prefix($this->bundle);
     // More reader friendly versions of the attribute names may be stored
     // in the validation language file, allowing a more readable version
     // of the attribute name to be used in the message.
     //
     // If no language line has been specified for the attribute, all of
     // the underscores will be removed from the attribute name and that
     // will be used as the attribtue name.
     $line = "{$bundle}validation.attributes.{$attribute}";
     $display = Lang::line($line)->get($this->language);
     return is_null($display) ? str_replace('_', ' ', $attribute) : $display;
 }
开发者ID:bamper,项目名称:laravel.com,代码行数:20,代码来源:validator.php

示例4: attribute

 /**
  * Get the displayable name for a given attribute.
  *
  * @param  string  $attribute
  * @return string
  */
 protected function attribute($attribute)
 {
     $bundle = Bundle::prefix($this->bundle);
     // More reader friendly versions of the attribute names may be stored
     // in the validation language file, allowing a more readable version
     // of the attribute name in the message.
     $line = "{$bundle}validation.attributes.{$attribute}";
     if (Lang::has($line, $this->language)) {
         return Lang::line($line)->get($this->language);
     } else {
         return str_replace('_', ' ', $attribute);
     }
 }
开发者ID:gigikiri,项目名称:masjid-l3,代码行数:19,代码来源:validator.php

示例5: attribute

 protected function attribute($attribute)
 {
     $bundle = Bundle::prefix($this->bundle);
     $line = "{$bundle}validation.attributes.{$attribute}";
     if (Lang::has($line, $this->language)) {
         return Lang::line($line)->get($this->language);
     } else {
         return str_replace('_', ' ', $attribute);
     }
 }
开发者ID:laravelbook,项目名称:framework3,代码行数:10,代码来源:laravel_lite.php

示例6: filters

 protected function filters($event)
 {
     $global = Bundle::prefix($this->bundle) . $event;
     $filters = array_unique(array($event, $global));
     if (isset($this->action[$event])) {
         $assigned = Filter::parse($this->action[$event]);
         $filters = array_merge($filters, $assigned);
     }
     if ($event == 'before') {
         $filters = array_merge($filters, $this->patterns());
     }
     return array(new Filter_Collection($filters));
 }
开发者ID:laravelbook,项目名称:framework3,代码行数:13,代码来源:laravel_lite.php


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