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.
36 lines
744 B
36 lines
744 B
<?php
|
|
/**
|
|
* @copyright NetMonsters <team@netmonsters.ru>
|
|
* @link http://netmonsters.ru
|
|
* @package Majestic
|
|
* @subpackage View
|
|
* @since 2010-03-16
|
|
* @version SVN: $Id$
|
|
* @filesource $URL$
|
|
*/
|
|
|
|
class TitleViewHelper extends ViewHelper
|
|
{
|
|
|
|
protected $separator = ' - ';
|
|
|
|
public function title($string = false)
|
|
{
|
|
if ($string) {
|
|
$data = Registry::get(__CLASS__, array());
|
|
$data[] = $string;
|
|
Registry::set(__CLASS__, $data);
|
|
}
|
|
return $this;
|
|
}
|
|
|
|
public function setSeparator($sep)
|
|
{
|
|
$this->separator = $sep;
|
|
}
|
|
|
|
public function __toString()
|
|
{
|
|
return implode($this->separator, Registry::get(__CLASS__, array()));
|
|
}
|
|
}
|