File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change 1
1
<?php
2
+ /**
3
+ * PHPCI - Continuous Integration for PHP
4
+ *
5
+ * @copyright Copyright 2013, Block 8 Limited.
6
+ * @license https://github.com/Block8/PHPCI/blob/master/LICENSE.md
7
+ * @link http://www.phptesting.org/
8
+ */
2
9
10
+ // Let PHP take a guess as to the default timezone, if the user hasn't set one:
11
+ date_default_timezone_set (@date_default_timezone_get ());
3
12
4
13
// Set up a basic autoloader for PHPCI:
5
14
$ autoload = function ($ class ) {
18
27
19
28
spl_autoload_register ($ autoload , true , true );
20
29
30
+ if (!file_exists (dirname (__FILE__ ) . '/PHPCI/config.yml ' ) && (!defined ('PHPCI_IS_CONSOLE ' ) || !PHPCI_IS_CONSOLE )) {
31
+ header ('Location: install.php ' );
32
+ die;
33
+ }
34
+
35
+ if (!file_exists (dirname (__FILE__ ) . '/vendor/autoload.php ' ) && defined ('PHPCI_IS_CONSOLE ' ) && PHPCI_IS_CONSOLE ) {
36
+ file_put_contents ('php://stderr ' , 'Please install PHPCI with "composer install" before using console ' );
37
+ exit (1 );
38
+ }
21
39
22
40
23
41
// Load Composer autoloader:
24
42
require_once (dirname (__FILE__ ) . '/vendor/autoload.php ' );
25
43
44
+ // Load configuration if present:
45
+ $ conf = array ();
46
+ $ conf ['b8 ' ]['app ' ]['namespace ' ] = 'PHPCI ' ;
47
+ $ conf ['b8 ' ]['app ' ]['default_controller ' ] = 'Home ' ;
48
+ $ conf ['b8 ' ]['view ' ]['path ' ] = dirname (__FILE__ ) . '/PHPCI/View/ ' ;
49
+
50
+ $ config = new b8 \Config ($ conf );
51
+ $ config ->loadYaml (dirname (__FILE__ ) . '/PHPCI/config.yml ' );
52
+
53
+ require_once (dirname (__FILE__ ) . '/vars.php ' );
You can’t perform that action at this time.
0 commit comments