Files
majestic/App/StaticAction.php

23 lines
524 B
PHP
Raw Normal View History

2014-06-02 18:58:49 +04:00
<?php namespace Majestic\App;
/**
* @copyright NetMonsters <team@netmonsters.ru>
* @link http://netmonsters.ru
* @package Majestic
* @subpackage app
* @since 2010-02-25
*/
abstract class StaticAction extends Action
{
2011-10-13 14:55:06 +04:00
protected function getTemplate()
{
2011-10-13 14:55:06 +04:00
$template = ($this->template) ? $this->template : substr(get_class($this), 0, -6 /*strlen('Action')*/);
return '/static/' . $template;
}
2011-10-13 14:55:06 +04:00
public function fetch()
{
return $this->view->fetch($this->getTemplate());
}
}