|
|
@ -518,10 +518,16 @@ class Flight {
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param string $file Template file
|
|
|
|
* @param string $file Template file
|
|
|
|
* @param array $data Template data
|
|
|
|
* @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);
|
|
|
|
self::view()->render($file, $data);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Handles ETag HTTP caching.
|
|
|
|
* Handles ETag HTTP caching.
|
|
|
|