/** * For one file Eden, you can set the default * location of Eden's template to another location. * * @param string * @return this */ public function setBlockRoot($root) { Eden_Error::i()->argument(1, 'folder'); self::$_blockRoot = $root; return $this; }
if(!class_exists('Eden_Block')){abstract class Eden_Block extends Eden_Class{protected static $_blockRoot=NULL;private static $_global=array();public function __toString(){try{return (string) $this->render();}catch(Exception $e){Eden_Error_Event::i()->exceptionHandler($e);}return '';}abstract public function getTemplate();abstract public function getVariables();public function render(){return Eden_Template::i()->set($this->getVariables())->parsePhp($this->getTemplate());}public function setBlockRoot($root){Eden_Error::i()->argument(1,'folder');self::$_blockRoot=$root;return $this;}protected function _getGlobal($value){if(in_array($value,self::$_global)){return false;}self::$_global[]=$value;return $value;}}}