function resolve($node,array $hive=NULL,$ttl=0,$persist=FALSE,$escape=NULL) {
		$fw=$this->fw;
		$cache=Cache::instance();
		if ($escape!==NULL) {
			$esc=$fw->ESCAPE;
			$fw->ESCAPE=$escape;
		}
		if ($ttl || $persist)
			$hash=$fw->hash($fw->serialize($node));
		if ($ttl && $cache->exists($hash,$data))
			return $data;
		if ($persist) {
			if (!is_dir($tmp=$fw->TEMP))
				mkdir($tmp,Base::MODE,TRUE);
			if (!is_file($this->file=($tmp.
				$fw->SEED.'.'.$hash.'.php')))
				$fw->write($this->file,$this->build($node));
			if (isset($_COOKIE[session_name()]) &&
				!headers_sent() && session_status()!=PHP_SESSION_ACTIVE)
				session_start();
			$fw->sync('SESSION');
			$data=$this->sandbox($hive);
		}
		else {
			if (!$hive)
				$hive=$fw->hive();
			if ($fw->ESCAPE)
				$hive=$this->esc($hive);
			extract($hive);
			unset($hive);
			ob_start();
			eval(' ?>'.$this->build($node).'<?php ');
			$data=ob_get_clean();
		}
		if ($ttl)
			$cache->set($hash,$data,$ttl);
		if ($escape!==NULL)
			$fw->ESCAPE=$esc;
		return $data;
	}
function resolve($node,array $hive=NULL,$ttl=0,$persist=FALSE,$escape=NULL) {
		$fw=$this->fw;
		$cache=Cache::instance();
		if ($escape!==NULL) {
			$esc=$fw->ESCAPE;
			$fw->ESCAPE=$escape;
		}
		if ($ttl || $persist)
			$hash=$fw->hash($fw->serialize($node));
		if ($ttl && $cache->exists($hash,$data))
			return $data;
		if ($persist) {
			if (!is_dir($tmp=$fw->TEMP))
				mkdir($tmp,Base::MODE,TRUE);
			if (!is_file($this->file=($tmp.
				$fw->SEED.'.'.$hash.'.php')))
				$fw->write($this->file,$this->build($node));
			if (isset($_COOKIE[session_name()]) &&
				!headers_sent() && session_status()!=PHP_SESSION_ACTIVE)
				session_start();
			$fw->sync('SESSION');
			$data=$this->sandbox($hive);
		}
		else {
			if (!$hive)
				$hive=$fw->hive();
			if ($fw->ESCAPE)
				$hive=$this->esc($hive);
			extract($hive);
			unset($hive);
			ob_start();
			eval(' ?>'.$this->build($node).'<?php ');
			$data=ob_get_clean();
		}
		if ($ttl)
			$cache->set($hash,$data,$ttl);
		if ($escape!==NULL)
			$fw->ESCAPE=$esc;
		return $data;
	}
function resolve ( $ node , array $ hive = NULL , $ ttl = 0 , $ persist = FALSE , $ escape = NULL ) { $ fw = $ this -> fw ; $ cache = Cache :: instance ( ) ; if ( $ escape !== NULL ) { $ esc = $ fw -> ESCAPE ; $ fw -> ESCAPE = $ escape ; } if ( $ ttl || $ persist ) $ hash = $ fw -> hash ( $ fw -> serialize ( $ node ) ) ; if ( $ ttl && $ cache -> exists ( $ hash , $ data ) ) return $ data ; if ( $ persist ) { if ( ! is_dir ( $ tmp = $ fw -> TEMP ) ) mkdir ( $ tmp , Base :: MODE , TRUE ) ; if ( ! is_file ( $ this -> file = ( $ tmp . $ fw -> SEED . '.' . $ hash . '.php' ) ) ) $ fw -> write ( $ this -> file , $ this -> build ( $ node ) ) ; if ( isset ( $ _COOKIE [ session_name ( ) ] ) && ! headers_sent ( ) && session_status ( ) != PHP_SESSION_ACTIVE ) session_start ( ) ; $ fw -> sync ( 'SESSION' ) ; $ data = $ this -> sandbox ( $ hive ) ; } else { if ( ! $ hive ) $ hive = $ fw -> hive ( ) ; if ( $ fw -> ESCAPE ) $ hive = $ this -> esc ( $ hive ) ; extract ( $ hive ) ; unset ( $ hive ) ; ob_start ( ) ; eval ( ' ?>' . $ this -> build ( $ node ) . '<?php ' ) ; $ data = ob_get_clean ( ) ; } if ( $ ttl ) $ cache -> set ( $ hash , $ data , $ ttl ) ; if ( $ escape !== NULL ) $ fw -> ESCAPE = $ esc ; return $ data ; }
Render template string
@return string
@param $node string|array
@param $hive array
@param $ttl int
@param $persist bool
@param $escape bool
Render template string