Prado\PradoBase::getPathOfNamespace PHP Метод

getPathOfNamespace() публичный статический Метод

The first segment of the namespace is considered as a path alias which is replaced with the actual path. The rest segments are subdirectory names appended to the aliased path. If the namespace ends with an asterisk '*', it represents a directory; Otherwise it represents a file whose extension name is specified by the second parameter (defaults to empty). Note, this method does not ensure the existence of the resulting file path.
public static getPathOfNamespace ( $namespace, $ext = '' ) : string
Результат string file path corresponding to the namespace, null if namespace is invalid
    public static function getPathOfNamespace($namespace, $ext = '')
    {
        $namespace = static::prado3NamespaceToPhpNamespace($namespace);
        if (self::CLASS_FILE_EXT === $ext || empty($ext)) {
            if (isset(self::$_usings[$namespace])) {
                return self::$_usings[$namespace];
            }
            if (isset(self::$_aliases[$namespace])) {
                return self::$_aliases[$namespace];
            }
        }
        $segs = explode('\\', $namespace);
        $alias = array_shift($segs);
        if (null !== ($file = array_pop($segs)) && null !== ($root = self::getPathOfAlias($alias))) {
            return rtrim($root . DIRECTORY_SEPARATOR . implode(DIRECTORY_SEPARATOR, $segs), '/\\') . ($file === '*' ? '' : DIRECTORY_SEPARATOR . $file . $ext);
        }
        return null;
    }