setPath(); } private static function setPath() { self::$path = get_stylesheet_directory().'/pages/'; } /** * @return AP_Template[] */ public static function getTemplates() { self::setPath(); if (!is_dir(self::$path)) { return array(); } $rets = array(); foreach(glob(self::$path.'page-*.php') as $file) { $rets[] = new AP_Template($file); } return $rets; } } endif;