2014-06-02 18:58:49 +04:00
|
|
|
<?php namespace Majestic\App;
|
2010-02-26 14:49:12 +00:00
|
|
|
/**
|
|
|
|
* @copyright NetMonsters <team@netmonsters.ru>
|
|
|
|
* @link http://netmonsters.ru
|
|
|
|
* @package Majestic
|
|
|
|
* @subpackage app
|
|
|
|
* @since 2010-02-25
|
|
|
|
*/
|
|
|
|
|
2010-03-14 12:12:17 +00:00
|
|
|
abstract class StaticAction extends Action
|
2010-02-26 14:49:12 +00:00
|
|
|
{
|
2011-10-13 14:55:06 +04:00
|
|
|
|
2010-02-26 14:49:12 +00: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')*/);
|
2010-02-26 14:49:12 +00:00
|
|
|
return '/static/' . $template;
|
|
|
|
}
|
2011-10-13 14:55:06 +04:00
|
|
|
|
2010-02-26 14:49:12 +00:00
|
|
|
public function fetch()
|
|
|
|
{
|
|
|
|
return $this->view->fetch($this->getTemplate());
|
|
|
|
}
|
|
|
|
}
|