src/Loops/Service/Renderer.php
private function loadViews() {
        if($this->views) {
            return;
        }

        //scan views - and store result in cache
        $cache = $this->getLoops()->getService("cache");
        $key = "Loops-Renderer-".implode("-", $this->view_dir);
        if($cache->contains($key)) {
            $this->views = $cache->fetch($key);
        }
        else {
            foreach($this->view_dir as $view_dir) {
                $this->scanViewDir($view_dir);
            }
            $cache->save($key, $this->views);
        }
    }
private function loadViews() {
        if($this->views) {
            return;
        }

        //scan views - and store result in cache
        $cache = $this->getLoops()->getService("cache");
        $key = "Loops-Renderer-".implode("-", $this->view_dir);
        if($cache->contains($key)) {
            $this->views = $cache->fetch($key);
        }
        else {
            foreach($this->view_dir as $view_dir) {
                $this->scanViewDir($view_dir);
            }
            $cache->save($key, $this->views);
        }
    }
private function loadViews ( ) { if ( $ this -> views ) { return ; } //scan views - and store result in cache $ cache = $ this -> getLoops ( ) -> getService ( "cache" ) ; $ key = "Loops-Renderer-" . implode ( "-" , $ this -> view_dir ) ; if ( $ cache -> contains ( $ key ) ) { $ this -> views = $ cache -> fetch ( $ key ) ; } else { foreach ( $ this -> view_dir as $ view_dir ) { $ this -> scanViewDir ( $ view_dir ) ; } $ cache -> save ( $ key , $ this -> views ) ; } }
Helper that scans the view dirs and stores the inforation in the cache
Helper that scans the view dirs and stores the inforation in the cache