Exemplo n.º 1
0
 public function HookInstall()
 {
     $generator = new DB_DataObject2_Generator();
     $generator->start();
     return;
 }
Exemplo n.º 2
0
//
require_once 'dataobject2/DataObject2.php';
require_once DATAOBJECT2_PATH . 'DataObject2/Generator.php';
if (!ini_get('register_argc_argv')) {
    echo "\nERROR: You must turn register_argc_argv On in you php.ini file for this to work\neg.\n\nregister_argc_argv = On\n\n";
    exit;
}
if (!@$_SERVER['argv'][1]) {
    echo "\nERROR: createTable.php usage:\n\nC:\\php\\pear\\DB\\DataObjects\\createTable.php example.ini\nC:\\php\\pear\\DB\\DataObjects\\createTable.php php config.php\n";
    exit;
}
if ($_SERVER['argv'][1] == 'php') {
    require_once $_SERVER['argv'][2];
} else {
    $config = parse_ini_file($_SERVER['argv'][1], true);
    foreach ($config as $class => $values) {
        $options =& PEAR::getStaticProperty($class, 'options');
        $options = $values;
    }
}
$options =& PEAR::getStaticProperty('DB_DataObject2', 'options');
if (empty($options)) {
    echo "\nERROR: could not read config\n\n";
    exit;
}
set_time_limit(0);
// use debug level from file if set..
DB_DataObject2::debugLevel(isset($options['debug']) ? $options['debug'] : 1);
$generator = new DB_DataObject2_Generator();
$generator->start();