Allow rendered content to be saved into a variable

pull/11/head
Mike Cao 14 years ago
parent fb507428b7
commit 84b8eeb044

@ -518,10 +518,16 @@ class Flight {
*
* @param string $file Template file
* @param array $data Template data
* @param string $key Key name
*/
public static function _render($file, $data = null) {
public static function _render($file, $data = null, $key = null) {
if ($key !== null) {
self::set($key, self::view()->fetch($file, $data));
}
else {
self::view()->render($file, $data);
}
}
/**
* Handles ETag HTTP caching.

Loading…
Cancel
Save