Todaymade\Daux\Tree\Builder::getName PHP Метод

getName() защищенный статический Метод

Get name for a file
protected static getName ( string $path ) : string
$path string
Результат string
    protected static function getName($path)
    {
        // ['dir' => 1, 'basename' => 2, 'filename' => 3, 'extension' => 5]
        preg_match('%^(.*?)[\\\\/]*(([^/\\\\]*?)(\\.([^\\.\\\\/]+?)|))[\\\\/\\.]*$%im', $path, $m);
        if (!isset($m[3])) {
            throw new RuntimeException('Name not found');
        }
        return $m[3];
    }