Last active
August 29, 2015 14:09
-
-
Save bradberger/b3840b1533e6153fb3b2 to your computer and use it in GitHub Desktop.
/vendor/anahita/anahita/vendor/nooku/libraries/koowa/template/abstract.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function __sandbox() | |
{ | |
set_error_handler(array($this, 'handleError'), E_WARNING | E_NOTICE); | |
$this->getStack()->push(clone $this); | |
//Extract the data in local scope | |
extract($this->_data, EXTR_SKIP); | |
// Capturing output into a buffer | |
ob_start(); | |
try { | |
include 'tmpl://'.$this->getStack()->getIdentifier(); | |
$this->_contents = ob_get_clean(); | |
$this->getStack()->pop(); | |
restore_error_handler(); | |
} catch(Exception $e) { | |
echo $e->getMessage(); | |
$this->_contents = ob_get_clean(); | |
} | |
return $this; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment