/** * Returns a command line parser instance built from an xml file. * * Example: * <code> * require_once 'Console/CommandLine.php'; * $parser = Console_CommandLine::fromXmlFile('path/to/file.xml'); * $result = $parser->parse(); * </code> * * @param string $file Path to the xml file * * @return Console_CommandLine The parser instance */ public static function fromXmlFile($file) { include_once 'Console/CommandLine/XmlParser.php'; return Console_CommandLine_XmlParser::parse($file); }
/** * Returns a command line parser instance built from an xml file. * * Example: * <code> * require_once 'Console/CommandLine.php'; * $parser = Console_CommandLine::fromXmlFile('path/to/file.xml'); * $result = $parser->parse(); * </code> * * @param string $file Path to the xml file * * @return Console_CommandLine The parser instance */ public static function fromXmlFile($file) { return Console_CommandLine_XmlParser::parse($file); }