/** * 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; }
/** * 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; }
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; }
/** * 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; }