-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathcli.php
More file actions
33 lines (25 loc) · 767 Bytes
/
Copy pathcli.php
File metadata and controls
33 lines (25 loc) · 767 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
<?php
#Add include folder for shard-query
set_include_path(get_include_path() . PATH_SEPARATOR . '../include');
#load configs
include './protected/config/common.conf.php';
include './protected/config/routes.conf.php';
include './protected/config/db.conf.php';
include $config['BASE_PATH'].'Doo.php';
include $config['BASE_PATH'].'app/DooConfig.php';
include $config['BASE_PATH'].'app/DooCliApp.php';
# Uncomment for auto loading the framework classes.
spl_autoload_register('Doo::autoload');
//only run via CLI
if(!defined('STDIN') ) exit;
//new CLI App
$cli = new DooCliApp;
//config
Doo::conf()->set($config);
//set default db
Doo::db()->setDb($dbconfig, $config['APP_MODE']);
//set routes
$cli->route = $route;
//run controller in args
$cli->run($argv);
?>