gleez/cms — pull request #716 by sergeyklay (2014-04-16 14:58:58+00:00)
Title: Gleez Breadcrumb v2.0.0

### Updated API

* Renamed `Breadcrumb::factory` to `Breadcrumb::instance` because it is a singleton
* Removed `@see` link because repo not found
* Renamed all protected vars like `$_var` → `$var` — gradually move to [PSR](http://www.php-fig.org/)
* Added `Breadcrumb::__toString`, `Breadcrumb::clear`, `Breadcrumb::getItems`
* Used `static::$instance` instead `self::$instance` to enable inheritance and overriding
* `Breadcrumb::addItem` now return `$this`
* Renamed protected `Breadcrumb::$_view` → public `Breadcrumb::$default` to enable to override it at bootstrap time
* Updated Breadcrumb Userguide

### Basic usage

Define somewhere your base item:
```php
protected $breadcrumb;

// ...

$this->breadcrumb = Breadcrumb::instance()->addItem('Home', Route::url('default'));
```

In the controller you can add more items:
```php
$this->breadcrumb
->addItem('Users list', Route::url('users-list'));
->addItem('John Doe');

// ...

$view = View::factory('your/some/controller/view')
->set('breadcrumb', $this->breadcrumb);
```

In the view you can print breadcrumbs:
```php
echo $breadcrumb;
```

Result: `Home > Users list > John Doe`