Exemple #1
0
 public function __init()
 {
     parent::__init();
     $this->_printHeader();
     $this->db_config = new MysqlConfig();
 }
Exemple #2
0
/**
 * Ihush Console
 *
 * @author     James.Huang <*****@*****.**>
 * @license    http://www.apache.org/licenses/LICENSE-2.0
 * @version    $Id$
 */
define('__HUSH_CLI', 1);
require_once '../etc/app.config.php';
require_once 'Hush/Util.php';
////////////////////////////////////////////////////////////////////////////////////////////////////
// Constants definition
define('__MYSQL_HOST', '127.0.0.1');
define('__MYSQL_PORT', '3306');
define('__MYSQL_USER', 'root');
define('__MYSQL_NAME', 'passwd');
define('__MYSQL_IMPORT_TOOL', 'mysql');
define('__MYSQL_DUMPER_TOOL', 'mysqldump');
define('__MYSQL_IMPORT_COMMAND', __MYSQL_IMPORT_TOOL . ' {PARAMS} < {SQLFILE}');
define('__MYSQL_DUMPER_COMMAND', __MYSQL_DUMPER_TOOL . ' {PARAMS} --add-drop-database > {SQLFILE}');
////////////////////////////////////////////////////////////////////////////////////////////////////
// Main process
try {
    require_once 'Demos/Cli.php';
    $cli = new Demos_Cli();
    $cli->run();
} catch (Exception $e) {
    Hush_Util::trace($e);
    exit;
}
Exemple #3
0
 public function __init()
 {
     parent::__init();
     $this->init_sql = realpath(__ROOT . '/doc/install/mysql.sql');
 }