Код: Выделить всё
class HotelsController extends Controller
{
public function actionIndex()
{
$meals = $this->_getMeals();
$countries = $this->_getCountries();
$this->render('index', array('meals' => $meals, 'countries ' => $countries));
}
}
Код: Выделить всё
<?php if ($this->beginCache('hotelView', array('duration'=>$cacheTime))) : ?>
<? echo $meals; ?>
<? endif; ?>
Код: Выделить всё
<?php if ($this->beginCache('hotelView', array('duration'=>$cacheTime))) : ?>
<? echo $this->_getMeals(); ?>
<? endif; ?>