1 | <?php |
||
2 | |||
3 | namespace Rougin\SparkPlug; |
||
4 | |||
5 | /** |
||
6 | * @package SparkPlug |
||
7 | * |
||
8 | * @author Rougin Gutib <[email protected]> |
||
9 | */ |
||
10 | class Instance |
||
11 | { |
||
12 | /** |
||
13 | * Creates a Codeigniter instance based on the application path. |
||
14 | * |
||
15 | * @param string $path |
||
16 | * @param array<string, string> $server |
||
17 | * @param array<string, string> $globals |
||
18 | * |
||
19 | * @return \Rougin\SparkPlug\Controller |
||
20 | */ |
||
21 | public static function create($path = '', array $server = array(), array $globals = array()) |
||
22 | { |
||
23 | 12 | $globals = empty($globals) ? $GLOBALS : $globals; |
|
24 | |||
25 | 12 | $server = empty($server) ? $_SERVER : $server; |
|
26 | |||
27 | 12 | $sparkplug = new SparkPlug($globals, $server, $path); |
|
28 | |||
29 | 12 | return $sparkplug->getCodeIgniter(); |
|
0 ignored issues
–
show
|
|||
30 | } |
||
31 | } |
||
32 |
This function has been deprecated. The supplier of the function has supplied an explanatory message.
The explanatory message should give you some clue as to whether and when the function will be removed and what other function to use instead.