當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。