Exemplo n.º 1
0
 /**
  * Extend the configuration with a custom configuration file.
  * 
  * @param  array  $extend
  * @return void
  */
 public static function extend($extend)
 {
     if (is_string($extend)) {
         $extend = C::get($extend);
     }
     static::$extend = $extend;
 }
Exemplo n.º 2
0
 /**
  * Extend the configuration with a custom configuration file.
  *
  * @param  array  $extend
  * @return void
  */
 public static function extend($extend)
 {
     if (is_string($extend)) {
         $extend = Laravel_Config::get($extend);
     }
     static::$extend = (array) $extend;
 }
Exemplo n.º 3
0
 public function filtered($contexts)
 {
     $contexts = func_num_args() > 1 ? func_get_args() : (array) $contexts;
     if ($contexts == ['default']) {
         return clone $this;
     }
     list($blacklist, $whitelist) = $this->blacklistWhiteList($contexts);
     $filtered = $this->withoutBlacklist($blacklist);
     $filteredGroup = new static('filtered');
     if (!$whitelist) {
         return $filteredGroup->extend($filtered);
     }
     foreach ($filtered as $action) {
         if ($action->visibleIn($whitelist)) {
             $filteredGroup->push($action);
         }
     }
     return $filteredGroup;
 }
Exemplo n.º 4
0
 /**
  * Use this method to transform a basic http response to its subclasses.
  *
  * @param IHttpResponse $httpResponse
  *
  * @return static
  */
 public static function create(IHttpResponse $httpResponse)
 {
     $customResponse = new static();
     $customResponse->extend($httpResponse);
     return $customResponse;
 }