public static function fromYamlString($yml, $config_yml = null)
    {
        $parser = new sfYamlParser();

        $yml_tree = $parser->parse($yml);

        if ($config_yml) {
            $yml_config_tree = $parser->parse($config_yml);
            self::mergeDefaultsIntoYml($yml_tree, $yml_config_tree);
        }

        $cmd = self::ymlToCmd($yml_tree);
        $cmd = self::ymlParseOptions($yml_tree, $cmd);
        $cmd = self::ymlParseArguments($yml_tree, $cmd);
        $cmd = self::ymlParseCommands($yml_tree, $cmd);

        return $cmd;
    }
public static function fromYamlString($yml, $config_yml = null)
    {
        $parser = new sfYamlParser();

        $yml_tree = $parser->parse($yml);

        if ($config_yml) {
            $yml_config_tree = $parser->parse($config_yml);
            self::mergeDefaultsIntoYml($yml_tree, $yml_config_tree);
        }

        $cmd = self::ymlToCmd($yml_tree);
        $cmd = self::ymlParseOptions($yml_tree, $cmd);
        $cmd = self::ymlParseArguments($yml_tree, $cmd);
        $cmd = self::ymlParseCommands($yml_tree, $cmd);

        return $cmd;
    }
public static function fromYamlString ( $ yml , $ config_yml = null ) { $ parser = new sfYamlParser ( ) ; $ yml_tree = $ parser -> parse ( $ yml ) ; if ( $ config_yml ) { $ yml_config_tree = $ parser -> parse ( $ config_yml ) ; self :: mergeDefaultsIntoYml ( $ yml_tree , $ yml_config_tree ) ; } $ cmd = self :: ymlToCmd ( $ yml_tree ) ; $ cmd = self :: ymlParseOptions ( $ yml_tree , $ cmd ) ; $ cmd = self :: ymlParseArguments ( $ yml_tree , $ cmd ) ; $ cmd = self :: ymlParseCommands ( $ yml_tree , $ cmd ) ; return $ cmd ; }
Read Console_CommandLine_Command from yml strings, one with all arguments
and one with configuration options to overwrite default values set in the
first one.

@param string $yml
@param string $config_yml
@return Console_CommandLine_Command
@throws Exception
Read Console_CommandLine_Command from yml strings one with all arguments and one with configuration options to overwrite default values set in the first one .