src/Colorium/Templating/Sandbox.php
protected function end()
    {
        // stop recording block
        $content = ob_get_clean();

        // read record
        list($name, $rewrite) = $this->record;

        // rewrite
        if($rewrite) {
            $this->blocks += [$name => $content];
        }
        // render
        else {
            echo isset($this->blocks[$name])
                ? $this->blocks[$name]
                : $content;
        }

        // reset record
        $this->record = null;
    }
protected function end()
    {
        // stop recording block
        $content = ob_get_clean();

        // read record
        list($name, $rewrite) = $this->record;

        // rewrite
        if($rewrite) {
            $this->blocks += [$name => $content];
        }
        // render
        else {
            echo isset($this->blocks[$name])
                ? $this->blocks[$name]
                : $content;
        }

        // reset record
        $this->record = null;
    }
protected function end ( ) { // stop recording block $ content = ob_get_clean ( ) ; // read record list ( $ name , $ rewrite ) = $ this -> record ; // rewrite if ( $ rewrite ) { $ this -> blocks += [ $ name => $ content ] ; } // render else { echo isset ( $ this -> blocks [ $ name ] ) ? $ this -> blocks [ $ name ] : $ content ; } // reset record $ this -> record = null ; }
Stop recording block
Stop recording block