1 | <?php |
||
13 | class Installer { |
||
14 | const MAIN_CONFIG_STUB = /** @lang JSON */ |
||
15 | <<<CONFIG |
||
16 | { |
||
17 | //Domain of main mirror |
||
18 | "domain" : "@domain", |
||
19 | //Base timezone |
||
20 | "timezone" : "@timezone", |
||
21 | //Settings of main DB |
||
22 | "db_host" : "@db_host", |
||
23 | "db_type" : "@db_type", |
||
24 | "db_name" : "@db_name", |
||
25 | "db_user" : "@db_user", |
||
26 | "db_password" : "@db_password", |
||
27 | "db_prefix" : "@db_prefix", |
||
28 | "db_charset" : "@db_charset", |
||
29 | //Settings of main Storage |
||
30 | "storage_type" : "Local", |
||
31 | "storage_url" : "", |
||
32 | "storage_host" : "localhost", |
||
33 | "storage_user" : "", |
||
34 | "storage_password" : "", |
||
35 | //Base language |
||
36 | "language" : "@language", |
||
37 | //Cache engine |
||
38 | "cache_engine" : "FileSystem", |
||
39 | //Settings of Memcached cache engine |
||
40 | "memcache_host" : "127.0.0.1", |
||
41 | "memcache_port" : "11211", |
||
42 | //Any length |
||
43 | "public_key" : "@public_key" |
||
44 | } |
||
45 | |||
46 | CONFIG; |
||
47 | /** |
||
48 | * @param string $source |
||
49 | * @param string $target |
||
50 | * @param string $db_engine |
||
51 | * |
||
52 | * @throws Exception |
||
53 | */ |
||
54 | static function install ($source, $target, $db_engine) { |
||
61 | /** |
||
62 | * @param string $source |
||
63 | * @param string $target |
||
64 | * @param string $db_engine |
||
65 | * |
||
66 | * @throws Exception |
||
67 | */ |
||
68 | protected static function pre_installation_checks ($source, $target, $db_engine) { |
||
76 | /** |
||
77 | * @param string $source |
||
78 | * |
||
79 | * @return array[] |
||
80 | */ |
||
81 | protected static function initialize_filesystem ($source) { |
||
120 | /** |
||
121 | * @param array[] $file_index_map |
||
122 | * @param string $source |
||
123 | * @param string $target |
||
124 | * |
||
125 | * @return string |
||
|
|||
126 | * |
||
127 | * @throws Exception |
||
128 | */ |
||
129 | protected static function extract ($file_index_map, $source, $target) { |
||
160 | } |
||
161 |
This check compares the return type specified in the
@return
annotation of a function or method doc comment with the types returned by the function and raises an issue if they mismatch.