Allow rendered content to be saved into a variable

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

@ -518,9 +518,15 @@ class Flight {
*
* @param string $file Template file
* @param array $data Template data
* @param string $key Key name
*/
public static function _render($file, $data = null) {
self::view()->render($file, $data);
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);
}
}
/**

Loading…
Cancel
Save