Code formatting for ViewHelper & tests

This commit is contained in:
Anton Terekhov
2012-11-21 15:43:20 +04:00
parent 0d58a907e5
commit 07a244ca35
11 changed files with 87 additions and 79 deletions

View File

@ -11,9 +11,9 @@
class BreadcrumbViewHelper extends ViewHelper
{
protected $separator = ' > ';
public function breadcrumb($text = false, $href = false)
{
if ($text) {
@ -21,22 +21,22 @@ class BreadcrumbViewHelper extends ViewHelper
}
return $this;
}
public function prepend($text, $href)
{
Registry::set(__CLASS__, array($text => $href) + Registry::get(__CLASS__, array()));
}
public function append($text, $href)
{
Registry::set(__CLASS__, Registry::get(__CLASS__, array()) + array($text => $href));
}
public function setSeparator($sep)
{
$this->separator = $sep;
}
public function __toString()
{
$data = array();