Files
majestic/view/helpers/HeadViewHelper.php

27 lines
562 B
PHP
Raw Normal View History

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