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.

26 lines
562 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. */
  9. class HeadViewHelper extends ViewHelper
  10. {
  11. public function head($string = false)
  12. {
  13. if ($string) {
  14. $data = Registry::get(__CLASS__, array());
  15. $data[] = $string;
  16. Registry::set(__CLASS__, $data);
  17. }
  18. return $this;
  19. }
  20. public function __toString()
  21. {
  22. return implode("\n ", Registry::get(__CLASS__, array())) . "\n";
  23. }
  24. }