From cd8b3f0bd654198533a8807c81e1dbb5c1c8589e Mon Sep 17 00:00:00 2001 From: "Christophe.Boulain" <> Date: Mon, 15 Feb 2010 09:24:37 +0000 Subject: Revert prado-cli.php commited by mistake. sorry --- framework/prado-cli.php | 53 ------------------------------------------------- 1 file changed, 53 deletions(-) diff --git a/framework/prado-cli.php b/framework/prado-cli.php index f9185e6b..9b9153c3 100755 --- a/framework/prado-cli.php +++ b/framework/prado-cli.php @@ -43,7 +43,6 @@ PradoCommandLineInterpreter::getInstance()->addActionClass('PradoCommandLineCrea PradoCommandLineInterpreter::getInstance()->addActionClass('PradoCommandLinePhpShell'); PradoCommandLineInterpreter::getInstance()->addActionClass('PradoCommandLineUnitTest'); PradoCommandLineInterpreter::getInstance()->addActionClass('PradoCommandLineActiveRecordGen'); -PradoCommandLineInterpreter::getInstance()->addActionClass('PradoCommandLineConvertConfig'); //run it; PradoCommandLineInterpreter::getInstance()->run($_SERVER['argv']); @@ -731,58 +730,6 @@ EOD; } } -/** - * Convert prado 3.1 XML configuration to new prado 3.2 PHP array configuration - * - * @author Christophe Boulain - * @version $Id$ - * @since 3.2 - */ -class PradoCommandLineConvertConfig extends PradoCommandLineAction -{ - - protected $action = 'xmltophp'; - protected $parameters = array('xml'); - protected $optional = array('output'); - protected $description = 'Convert a prado xml configuration file () to a php array. '; - - public function performAction($args) - { - $xml=realpath($args[1]); - if (!is_file($xml)) - { - echo "Unable to find {$args[1]} file.\n"; - return true; - } - $output=$args[2]; - if ($output===null) - $output=dirname($xml).DIRECTORY_SEPARATOR.basename($xml, 'xml')."php"; - if (!is_writable(realpath(dirname($output)))) - { - echo "Can't write new config file {$output}\n"; - return true; - } - $config=$this->parseXML($xml); - print_r($config); - - return true; - } - - /** - * Open and parse an xml config file. - * @param string $xml the filepath of xml file - * @return array - */ - protected function parseXML($xml) - { - $dom=new DOMDocument(); - $dom->load($xml); - print_r ($dom->childNodes); - return ; - } - -} - //run PHP shell if(class_exists('PHP_Shell_Commands', false)) { -- cgit v1.2.3