2014-06-02 18:58:49 +04:00
|
|
|
<?php namespace Majestic\View\Helpers;
|
2010-03-16 14:47:06 +00:00
|
|
|
/**
|
|
|
|
* @copyright NetMonsters <team@netmonsters.ru>
|
|
|
|
* @link http://netmonsters.ru
|
|
|
|
* @package Majestic
|
|
|
|
* @subpackage View
|
|
|
|
* @since 2010-03-16
|
|
|
|
*/
|
|
|
|
|
2010-04-26 19:56:01 +00:00
|
|
|
class HeadViewHelper extends ViewHelper
|
2010-03-16 14:47:06 +00:00
|
|
|
{
|
2012-11-21 15:43:20 +04:00
|
|
|
|
2010-03-16 14:47:06 +00:00
|
|
|
public function head($string = false)
|
|
|
|
{
|
|
|
|
if ($string) {
|
2014-06-02 18:58:49 +04:00
|
|
|
$data = \Majestic\Registry::get(__CLASS__, array());
|
2010-03-16 14:47:06 +00:00
|
|
|
$data[] = $string;
|
2014-06-02 18:58:49 +04:00
|
|
|
\Majestic\Registry::set(__CLASS__, $data);
|
2010-03-16 14:47:06 +00:00
|
|
|
}
|
|
|
|
return $this;
|
|
|
|
}
|
2012-11-21 15:43:20 +04:00
|
|
|
|
2010-03-16 14:47:06 +00:00
|
|
|
public function __toString()
|
|
|
|
{
|
2014-06-02 18:58:49 +04:00
|
|
|
return implode("\n ", \Majestic\Registry::get(__CLASS__, array())) . "\n";
|
2010-03-16 14:47:06 +00:00
|
|
|
}
|
|
|
|
}
|