Registry, ViewHelperHead added, Config now inherited from Registry, #16

git-svn-id: svn+ssh://code.netmonsters.ru/svn/majestic/branches/evo@130 4cb57b5f-5bbd-dd11-951b-001d605cbbc5
This commit is contained in:
pzinovkin
2010-03-16 14:47:06 +00:00
parent f9ef17a685
commit d6b0a9d37d
3 changed files with 106 additions and 29 deletions

View File

@ -0,0 +1,29 @@
<?php
/**
* @copyright NetMonsters <team@netmonsters.ru>
* @link http://netmonsters.ru
* @package Majestic
* @subpackage View
* @since 2010-03-16
* @version SVN: $Id$
* @filesource $URL$
*/
class ViewHelperHead extends ViewHelper
{
public function head($string = false)
{
if ($string) {
$data = Registry::get(__CLASS__, array());
$data[] = $string;
Registry::set(__CLASS__, $data);
}
return $this;
}
public function __toString()
{
return implode("\n ", Registry::get(__CLASS__, array())) . "\n";
}
}