You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

28 lines
605 B

  1. <?php
  2. /**
  3. * @copyright NetMonsters <team@netmonsters.ru>
  4. * @link http://netmonsters.ru
  5. * @package Majestic
  6. * @subpackage View
  7. * @since 2010-03-16
  8. * @version SVN: $Id$
  9. * @filesource $URL$
  10. */
  11. class HeadViewHelper extends ViewHelper
  12. {
  13. public function head($string = false)
  14. {
  15. if ($string) {
  16. $data = Registry::get(__CLASS__, array());
  17. $data[] = $string;
  18. Registry::set(__CLASS__, $data);
  19. }
  20. return $this;
  21. }
  22. public function __toString()
  23. {
  24. return implode("\n ", Registry::get(__CLASS__, array())) . "\n";
  25. }
  26. }