diff --git a/flextype/Cache.php b/flextype/Cache.php index 0446b278..a390a6df 100755 --- a/flextype/Cache.php +++ b/flextype/Cache.php @@ -125,7 +125,7 @@ class Cache break; default: // Create doctrine cache directory if its not exists - !Flextype::$filesystem->exists($cache_directory = CACHE_PATH . '/doctrine/') and Flextype::$filesystem->mkdir($cache_directory); + !Flextype::filesystem()->exists($cache_directory = CACHE_PATH . '/doctrine/') and Flextype::filesystem()->mkdir($cache_directory); $driver = new \Doctrine\Common\Cache\FilesystemCache($cache_directory); break; } @@ -195,7 +195,7 @@ class Cache */ public static function clear() { - Flextype::$filesystem->remove(CACHE_PATH . '/doctrine/'); + Flextype::filesystem()->remove(CACHE_PATH . '/doctrine/'); } /** diff --git a/flextype/Config.php b/flextype/Config.php index 29ae9164..4c71e3d3 100755 --- a/flextype/Config.php +++ b/flextype/Config.php @@ -51,7 +51,7 @@ class Config */ protected function __construct() { - if (Flextype::$filesystem->exists($site_config = CONFIG_PATH . '/' . 'site.yml')) { + if (Flextype::filesystem()->exists($site_config = CONFIG_PATH . '/' . 'site.yml')) { static::$config['site'] = Yaml::parse(file_get_contents($site_config)); } else { throw new RuntimeException("Flextype site config file does not exist."); diff --git a/flextype/Pages.php b/flextype/Pages.php index 2c8b8bed..2b193001 100755 --- a/flextype/Pages.php +++ b/flextype/Pages.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - + namespace Flextype; use Arr; @@ -75,7 +75,7 @@ class Pages } // Get 404 page if file not exists - if (Flextype::$filesystem->exists($file)) { + if (Flextype::filesystem()->exists($file)) { $file = $file; } else { $file = PAGES_PATH . '/404/index.md'; @@ -95,7 +95,7 @@ class Pages $site_theme = Config::get('site.theme'); $template_path = THEMES_PATH . '/' . $site_theme . '/' . $template_name . $template_ext; - if (Flextype::$filesystem->exists($template_path)) { + if (Flextype::filesystem()->exists($template_path)) { include $template_path; } else { throw new RuntimeException("Template {$template_name} does not exist."); @@ -171,7 +171,7 @@ class Pages public static function getPages($url = '', $raw = false, $order_by = 'title', $order_type = 'DESC', $limit = null) { // Get pages list for current $url - $pages_list = Flextype::$finder->files()->name('*.md')->in(PAGES_PATH . '/' . $url); + $pages_list = Flextype::finder()->files()->name('*.md')->in(PAGES_PATH . '/' . $url); // Go trough pages list foreach ($pages_list as $key => $page) { diff --git a/flextype/Plugins.php b/flextype/Plugins.php index 6db6662e..53b3fc07 100755 --- a/flextype/Plugins.php +++ b/flextype/Plugins.php @@ -9,7 +9,7 @@ * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ - + namespace Flextype; use Symfony\Component\Yaml\Yaml; @@ -45,7 +45,7 @@ class Plugins // Go through... foreach ($plugins_list as $plugin) { - if (Flextype::$filesystem->exists($_plugin = PLUGINS_PATH . '/' . $plugin . '/' . $plugin . '.yml')) { + if (Flextype::filesystem()->exists($_plugin = PLUGINS_PATH . '/' . $plugin . '/' . $plugin . '.yml')) { $plugins_cache_id .= filemtime($_plugin); } } @@ -65,7 +65,7 @@ class Plugins // Go through... foreach ($plugins_list as $plugin) { - if (Flextype::$filesystem->exists($_plugin_manifest = PLUGINS_PATH . '/' . $plugin . '/' . $plugin . '.yml')) { + if (Flextype::filesystem()->exists($_plugin_manifest = PLUGINS_PATH . '/' . $plugin . '/' . $plugin . '.yml')) { $plugin_manifest = Yaml::parseFile($_plugin_manifest); } diff --git a/flextype/Themes.php b/flextype/Themes.php index 2211ef33..5478ab8e 100644 --- a/flextype/Themes.php +++ b/flextype/Themes.php @@ -37,7 +37,7 @@ class Themes // Get current theme $theme = Config::get('site.theme'); - if (Flextype::$filesystem->exists($theme_manifest_file = THEMES_PATH . '/' . $theme . '/' . $theme . '.yml')) { + if (Flextype::filesystem()->exists($theme_manifest_file = THEMES_PATH . '/' . $theme . '/' . $theme . '.yml')) { $theme_manifest = Yaml::parseFile($theme_manifest_file); Config::set('themes.'.Config::get('site.theme'), $theme_manifest); }