3 * Zend Framework (http://framework.zend.com/)
5 * @link http://github.com/zendframework/zf2 for the canonical source repository
6 * @copyright Copyright (c) 2005-2013 Zend Technologies USA Inc. (http://www.zend.com)
7 * @license http://framework.zend.com/license/new-bsd New BSD License
10 namespace Zend\View\Helper\Navigation
;
12 use Zend\View\Exception
;
13 use Zend\View\HelperPluginManager
;
16 * Plugin manager implementation for navigation helpers
18 * Enforces that helpers retrieved are instances of
19 * Navigation\HelperInterface. Additionally, it registers a number of default
22 class PluginManager
extends HelperPluginManager
25 * Default set of helpers
29 protected $invokableClasses = array(
30 'breadcrumbs' => 'Zend\View\Helper\Navigation\Breadcrumbs',
31 'links' => 'Zend\View\Helper\Navigation\Links',
32 'menu' => 'Zend\View\Helper\Navigation\Menu',
33 'sitemap' => 'Zend\View\Helper\Navigation\Sitemap',
39 * Checks that the helper loaded is an instance of AbstractHelper.
41 * @param mixed $plugin
43 * @throws Exception\InvalidArgumentException if invalid
45 public function validatePlugin($plugin)
47 if ($plugin instanceof AbstractHelper
) {
52 throw new Exception\
InvalidArgumentException(sprintf(
53 'Plugin of type %s is invalid; must implement %s\AbstractHelper',
54 (is_object($plugin) ?
get_class($plugin) : gettype($plugin)),