| @@ 114-127 (lines=14) @@ | ||
| 111 | * |
|
| 112 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 113 | */ |
|
| 114 | public static function create($_) |
|
| 115 | { |
|
| 116 | if (func_num_args() < 1) { |
|
| 117 | return static::createFromArray([]); |
|
| 118 | } |
|
| 119 | ||
| 120 | $arguments = func_get_args(); |
|
| 121 | ||
| 122 | if (is_array($arguments[0]) && func_num_args() === 1) { |
|
| 123 | return static::createFromArray($arguments[0]); |
|
| 124 | } |
|
| 125 | ||
| 126 | return static::createFromFile($arguments); |
|
| 127 | } |
|
| 128 | ||
| 129 | /** |
|
| 130 | * Create a new ConfigInterface object, by merging several files together. |
|
| @@ 140-153 (lines=14) @@ | ||
| 137 | * |
|
| 138 | * @return ConfigInterface Instance of a ConfigInterface implementation. |
|
| 139 | */ |
|
| 140 | public static function merge($_) |
|
| 141 | { |
|
| 142 | if (func_num_args() < 1) { |
|
| 143 | return static::createFromArray([]); |
|
| 144 | } |
|
| 145 | ||
| 146 | $arguments = func_get_args(); |
|
| 147 | ||
| 148 | if (is_array($arguments[0]) && func_num_args() === 1) { |
|
| 149 | return static::createFromArray($arguments[0]); |
|
| 150 | } |
|
| 151 | ||
| 152 | return static::mergeFromFiles($arguments); |
|
| 153 | } |
|
| 154 | ||
| 155 | /** |
|
| 156 | * Create a new ConfigInterface object by merging data from several files. |
|