-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathmigrate
More file actions
39 lines (32 loc) · 953 Bytes
/
Copy pathmigrate
File metadata and controls
39 lines (32 loc) · 953 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/usr/bin/env php
<?php
/*
* Command line migration script launcher.
*
* @copyright 2007 Fernando Val
* @author Fernando Val <fernando.val@gmail.com>
*
* @version 0.6.0
*/
define('SPRINGY_START', microtime(true));
require __DIR__ . '/consts.php';
// Loads the Composer autoload
require __DIR__ . '/vendor/autoload.php';
// Define error handlers
error_reporting(E_ALL);
set_exception_handler('springyExceptionHandler');
set_error_handler('springyErrorHandler');
// Starts required super globals
$_SERVER['QUERY_STRING'] = '';
$_SERVER['REMOTE_ADDR'] = '127.0.0.1';
$_SERVER['REQUEST_METHOD'] = 'GET';
$_SERVER['REQUEST_URI'] = '__migration__';
$_SERVER['SERVER_PROTOCOL'] = 'CLI/Mode';
$_SERVER['HTTP_HOST'] = 'cmd.shell';
$_SERVER['DOCUMENT_ROOT'] = __DIR__;
// Define error handlers
error_reporting(E_ALL);
set_exception_handler('springyExceptionHandler');
set_error_handler('springyErrorHandler');
ob_start();
Springy\Kernel::run();