forked from pleebe/FoolFuuka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathconsole
executable file
·68 lines (52 loc) · 1.36 KB
/
console
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
#!/usr/bin/env php
<?php
if (substr(php_sapi_name(), 0, 3) == 'cgi')
{
die("You can run the FoolFrame console only from the command line.\n\n");
}
/**
* Set error reporting and display errors settings. You will want to change these when in production.
*/
error_reporting(-1);
ini_set('display_errors', 1);
/**
* Website document root
*/
define('DOCROOT', __DIR__.'/public/'.DIRECTORY_SEPARATOR);
/**
* The path to the Composer vendor directory.
*/
define('VENDPATH', realpath(__DIR__.'/vendor/').DIRECTORY_SEPARATOR);
/**
* The "VENDOR APP" directory where live content can be stored
*/
define('VAPPPATH', realpath(__DIR__.'/app/').DIRECTORY_SEPARATOR);
/**
* The "ASSSETS APP" directory where live content can be stored
*/
define('ASSETSPATH', realpath(__DIR__.'/assets/').DIRECTORY_SEPARATOR);
function e($string)
{
return htmlentities($string);
}
function _i()
{
$argc = func_num_args();
$args = func_get_args();
$args[0] = gettext($args[0]);
if ($argc <= 1)
{
return $args[0];
}
return call_user_func_array('sprintf', $args);
}
function _n()
{
$args = func_get_args();
$args[0] = ngettext($args[0], $args[1], $args[2]);
array_splice($args, 1, 1);
return call_user_func_array('sprintf', $args);
}
// Boot the app
require VENDPATH.'autoload.php';
(new Foolz\FoolFrame\Model\Context())->handleConsole();