protected static function paths(Blueprint $blueprint, $directory, $filename = null)
    {
        $yaml = file_exists($filename) ? file_get_contents($filename) : '';

        $yaml = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $yaml);

        $yaml = str_replace('%%CURRENT_DIRECTORY%%', $directory, $yaml);

        $result = Yaml::parse($yaml) ?: self::defaults();

        $blueprint->setTemplatePath($result['paths']['templates']);

        $blueprint->setCommandPath($result['paths']['commands']);

        $blueprint->setCommandNamespace($result['namespaces']['commands']);

        return $blueprint;
    }
protected static function paths(Blueprint $blueprint, $directory, $filename = null)
    {
        $yaml = file_exists($filename) ? file_get_contents($filename) : '';

        $yaml = str_replace(array('\\', '/'), DIRECTORY_SEPARATOR, $yaml);

        $yaml = str_replace('%%CURRENT_DIRECTORY%%', $directory, $yaml);

        $result = Yaml::parse($yaml) ?: self::defaults();

        $blueprint->setTemplatePath($result['paths']['templates']);

        $blueprint->setCommandPath($result['paths']['commands']);

        $blueprint->setCommandNamespace($result['namespaces']['commands']);

        return $blueprint;
    }
protected static function paths ( Blueprint $ blueprint , $ directory , $ filename = null ) { $ yaml = file_exists ( $ filename ) ? file_get_contents ( $ filename ) : '' ; $ yaml = str_replace ( array ( '\\' , '/' ) , DIRECTORY_SEPARATOR , $ yaml ) ; $ yaml = str_replace ( '%%CURRENT_DIRECTORY%%' , $ directory , $ yaml ) ; $ result = Yaml :: parse ( $ yaml ) ? : self :: defaults ( ) ; $ blueprint -> setTemplatePath ( $ result [ 'paths' ] [ 'templates' ] ) ; $ blueprint -> setCommandPath ( $ result [ 'paths' ] [ 'commands' ] ) ; $ blueprint -> setCommandNamespace ( $ result [ 'namespaces' ] [ 'commands' ] ) ; return $ blueprint ; }
Prepares the paths that are defined from a YAML file.

@param  \Rougin\Blueprint\Blueprint $blueprint
@param  string                      $directory
@param  string|null                 $filename
@return \Rougin\Blueprint\Blueprint
Prepares the paths that are defined from a YAML file .