mirror of
https://github.com/SophiaAtkinson/steamwidgets-web.git
synced 2025-06-27 10:17:41 -07:00
38 lines
632 B
PHP
38 lines
632 B
PHP
<?php
|
|
|
|
/**
|
|
* Base controller class
|
|
*
|
|
* Extend or modify to fit your project needs
|
|
*/
|
|
class BaseController extends Asatru\Controller\Controller {
|
|
/**
|
|
* @var string
|
|
*/
|
|
protected $layout = 'layout';
|
|
|
|
/**
|
|
* Perform base initialization
|
|
*
|
|
* @param $layout
|
|
* @return void
|
|
*/
|
|
public function __construct($layout = '')
|
|
{
|
|
if ($layout !== '') {
|
|
$this->layout = $layout;
|
|
}
|
|
}
|
|
|
|
/**
|
|
* A more convenient view helper
|
|
*
|
|
* @param array $yields
|
|
* @param array $attr
|
|
* @return Asatru\View\ViewHandler
|
|
*/
|
|
public function view($yields, $attr = array())
|
|
{
|
|
return view($this->layout, $yields, $attr);
|
|
}
|
|
} |