| @@ 84-91 (lines=8) @@ | ||
| 81 | * |
|
| 82 | * @return Config|mixed |
|
| 83 | */ |
|
| 84 | public function config($key = null, $default = null) |
|
| 85 | { |
|
| 86 | if (func_num_args() == 0) { |
|
| 87 | return $this->get('config'); |
|
| 88 | } |
|
| 89 | ||
| 90 | return $this->get('config')->get($key, $default); |
|
| 91 | } |
|
| 92 | } |
|
| 93 | ||
| @@ 47-54 (lines=8) @@ | ||
| 44 | * @param mixed $default |
|
| 45 | * @return array|mixed|$this|null |
|
| 46 | */ |
|
| 47 | public function __invoke($key = null, $default = null) |
|
| 48 | { |
|
| 49 | if (func_num_args() == 0) { |
|
| 50 | return $this; |
|
| 51 | } |
|
| 52 | ||
| 53 | return $this->get($key, $default); |
|
| 54 | } |
|
| 55 | ||
| 56 | /** |
|
| 57 | * @param string $key |
|