Set helper plugin manager instance

@param  string|HelperPluginManager $helpers
@return View
@throws Exception\InvalidArgumentException
7210
public function setHelperPluginManager($helpers)
    {
        if (is_string($helpers)) {
            if (!class_exists($helpers)) {
                throw new Exception\InvalidArgumentException(sprintf(
                    'Invalid helper helpers class provided (%s)',
                    $helpers
                ));
            }
            $helpers = new $helpers();
        }
        if (!$helpers instanceof HelperPluginManager) {
            throw new Exception\InvalidArgumentException(sprintf(
                'Helper helpers must extend HumusMvc\View\HelperPluginManager; got type "%s" instead',
                (is_object($helpers) ? get_class($helpers) : gettype($helpers))
            ));
        }
        $helpers->setView($this);
        $this->_helpers = $helpers;

        return $this;
    }
258290
public function setCallbacks(array $callbacks)
    {
        @trigger_error(sprintf('The "%s()" method is deprecated since Symfony 4.2, use the "callbacks" key of the context instead.', __METHOD__), E_USER_DEPRECATED);

        foreach ($callbacks as $attribute => $callback) {
            if (!\is_callable($callback)) {
                throw new InvalidArgumentException(sprintf('The given callback for attribute "%s" is not callable.', $attribute));
            }
        }
        $this->defaultContext[self::CALLBACKS] = $this->callbacks = $callbacks;

        return $this;
    }
1081867
public function __isset($helper)
  {
    if (isset($this->_helpers[$helper])) {
      $isset = true;
    } else {
      $isset = !is_null($this->_getHelper($helper));
    }
    return $isset;
  }
446596
public function injectRenderer($helper)
    {
        $renderer = $this->getRenderer();
        if (null === $renderer) {
            return;
        }

        $helper->setView($renderer);
    }
725759
public static function setDumper($dumper)
    {
        if (!$dumper instanceof interfaces\Dumper && !is_callable($dumper)) {
            throw new \InvalidArgumentException('Expected an instance of ['.interfaces\Dumper::class.'] or a callable, got ['.static::getTypeName($dumper).'] instead.');
        }

        static::$dumper = $dumper;
    }
1128043
public function registerHelper($helperName)
    {
        $className = __CLASS__ . '\\Helper\\' . ucfirst($helperName);
        try {
            $helperInstance = $this->getClassInstance($className);
            if (!$helperInstance instanceof VoltHelperAbstract) {
                throw new InvalidHelperException();
            }
            $this->getCompiler()->addFunction($helperName, $helperInstance->getHelper());
        } catch (\ReflectionException $e) {
            throw new UnknownHelperException(sprintf('Helper \'%s\' does not exist', $helperName));
        } catch (\Exception $e) {
            throw new InvalidHelperException(sprintf('Invalid helper \'%s\'', $helperName));
        }
    }
14791
public function getHelper($helperType)
    {
        if ($this->isValidKey($helperType)) {
            return $this->getHelperMap()->get($helperType);
        } else {
            throw new InvalidArgumentException('Invalid form helper type given');
        }
    }
1071376
public function get($name)
    {
        if (!isset($this->helpers[$name])) {
            throw new \InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name));
        }

        return $this->helpers[$name];
    }
885078
public function setAutocomplete($autocomplete)
    {
        if ($autocomplete !== null && !is_callable($autocomplete)) {
            throw new \InvalidArgumentException('Invalid autocomplete function given');
        }

        $this->autocomplete = $autocomplete;

        return $this;
    }
925964
public function setDivider($divider = '/'): Breadcrumbs
    {
        if (!is_string($divider) && !is_null($divider)) {
            throw new InvalidArgumentException('Breadcrumbs::setDivider() only accepts strings or NULL');
        }
        $this->setOption('divider', $divider);

        return $this;
    }
416226
public function set(HelperInterface $helper, $alias = null)
    {
        $this->helpers[$helper->getName()] = $helper;
        if (null !== $alias) {
            $this->helpers[$alias] = $helper;
        }

        $helper->setHelperSet($this);
    }
103452
public function setModuleDirs($dirs) {
	    
	    if(!is_array($dirs) && !($dirs instanceof \Traversable)){
	        throw new \InvalidArgumentException('Invalid argument $dirs; array or instance of Traversable expected');
	    }
	    
	    $this->moduleDirs = array();
	    
		foreach($dirs as $dir){
		    if(!is_dir($dir) || !is_readable($dir)){
		        throw new \Exception('Illegal module directory specified: '.$dir);
		    }
		    
		    $this->moduleDirs[] = $dir;
		}
	}
1202215
public static function setLoader($loader) {
    if (!$loader) {
      self::$_loader = NULL;
      return;
    }
    if ($loader instanceof FluentDOM\Loadable) {
      self::$_loader = $loader;
      return;
    }
    throw new FluentDOM\Exceptions\InvalidArgument(
      'loader', [Loadable::class]
    );
  }
981363
protected function setViewHelpers()
    {
        $this->set('token', $this->app->make('token'));
        $this->set('form', $this->app->make('helper/form'));
        $this->set('ui', $this->app->make('helper/concrete/ui'));
        $this->set('resolverManager', $this->app->make(ResolverManagerInterface::class));
    }
196518
protected function getHelper($helper, $params=array())
    {
        if ($this->isLibraryHelper($helper)) $this->_helperClassName = $this->_libNamespace . $helper;
        else if ($this->isApplicationHelper($helper)) $this->_helperClassName = $this->_appNamespace . $helper;
        else throw new HelperNotFoundException('The helper ' . $helper . ' does not exist');

        $this->_helperParams = $params;
    }
1055008
public function on(\Closure $checker, \Closure $handler)
    {
        $this->managers[] = new Manager($checker, $handler);

        return $this;
    }
1043272
public function helper($helper)
    {
        $helperPath = $this->getHelperPath($helper);

        if ($helperPath === null) {
            throw new InvalidArgumentException("Helper [{$helper}] not found.");
        }

        $args = func_get_args();
        unset($args[0]);

        $callback = include($helperPath);

        if (!is_callable($callback)) {
            throw new BadFunctionCallException("Helper [{$helper}] is invalid.");
        }

        return call_user_func_array($callback, $args);
    }