mirror of
https://github.com/SophiaAtkinson/steamwidgets-web.git
synced 2025-06-27 14:37:41 -07:00
Initial commit
This commit is contained in:
38
app/controller/_base.php
Normal file
38
app/controller/_base.php
Normal file
@ -0,0 +1,38 @@
|
||||
<?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);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user