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:
29
view/helpers/ViewHelperHead.php
Normal file
29
view/helpers/ViewHelperHead.php
Normal 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";
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user