Пример #1
0
 /**
  * @param LayoutModel $layout
  * @param $model
  * @return null|ViewModel|LayoutModel
  */
 protected function model(LayoutModel $layout, $model = null)
 {
     if (!$model instanceof ViewModel || $model instanceof LayoutModel) {
         return $model;
     }
     $layout->model($model);
     return $layout;
 }
Пример #2
0
 /**
  * @param _Layout $layout
  * @param mixed|Template $model
  * @return _Layout
  */
 function __invoke(_Layout $layout, $model)
 {
     $layout->model($model);
     return $layout;
 }