themes::templates PHP Méthode

templates() public static méthode

public static templates ( $theme )
    public static function templates($theme)
    {
        $templates = array();
        $fi = new FilesystemIterator(PATH . 'themes/' . $theme, FilesystemIterator::SKIP_DOTS);
        foreach ($fi as $file) {
            $ext = pathinfo($file->getFilename(), PATHINFO_EXTENSION);
            $base = $file->getBasename('.' . $ext);
            if ($file->isFile() and $ext == 'php') {
                $templates[$base] = $base;
            }
        }
        return $templates;
    }