} unset($params[$key]); } else { printf("Invalid option \"%1\$s\"\n", $option); usage(); } } } $site = 'default'; if (count($params) > 0 && ($site = end($params)) === false) { usage(); } spl_autoload_register('setup_autoload'); require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; $arcavias = new Arcavias(isset($options['extdir']) ? (array) $options['extdir'] : array()); $taskPaths = $arcavias->getSetupPaths($site); $includePaths = $taskPaths; $includePaths[] = get_include_path(); if (set_include_path(implode(PATH_SEPARATOR, $includePaths)) === false) { throw new Exception('Unable to extend include path'); } $ctx = new MShop_Context_Item_Default(); $confPaths = $arcavias->getConfigPaths('mysql'); if (isset($options['config'])) { $confPaths = array_merge($confPaths, (array) $options['config']); } $conf = new MW_Config_Array(array(), $confPaths); $conf = new MW_Config_Decorator_Memory($conf); $ctx->setConfig($conf); $conf->set('setup/site', $site); if (isset($options['option'])) {
printf("Invalid option \"%1\$s\"\n", $option); usage(); } } } $site = $parent = 'default'; if (($site = array_shift($params)) === null) { $site = 'default'; } if (($parent = array_shift($params)) === null) { $parent = $site; } spl_autoload_register('setup_autoload'); require 'vendor' . DIRECTORY_SEPARATOR . 'autoload.php'; $arcavias = new Arcavias(isset($options['extdir']) ? (array) $options['extdir'] : array()); $taskPaths = $arcavias->getSetupPaths($parent); $includePaths = $taskPaths; $includePaths[] = get_include_path(); if (set_include_path(implode(PATH_SEPARATOR, $includePaths)) === false) { throw new Exception('Unable to extend include path'); } $ctx = new MShop_Context_Item_Default(); $confPaths = $arcavias->getConfigPaths('mysql'); if (isset($options['config'])) { $confPaths = array_merge($confPaths, (array) $options['config']); } $conf = new MW_Config_Array(array(), $confPaths); $conf = new MW_Config_Decorator_Memory($conf); $ctx->setConfig($conf); $conf->set('setup/site', $site); if (isset($options['option'])) {