Sets a helper.

@param HelperInterface $helper The helper instance
@param string          $alias  An alias
188808
public function set(HelperInterface $helper, $alias = null)
    {
        $this->helpers[$helper->getName()] = $helper;
        if (null !== $alias) {
            $this->helpers[$alias] = $helper;
        }

        $helper->setCharset($this->charset);
    }
1314391
public function setAlias($alias) {
        if ($alias !== null && ! $this->argumentsParser->isOptionAlias($alias)) {
            throw new InvalidOptionAliasException(s(
                'A option alias must have this format: "-f", got: "%s"', $alias
            ));
        }

        $this->alias = $alias;

        return $this;
    }
179627
public function injectView($helper)
    {
        $view = $this->getView();
        if (null === $view) {
            return;
        }
        $helper->setView($view);
    }
1164855
private function add_helpers( $helpers ) {
		foreach( $helpers as $helper ) {
			$helper = $this->validate_helper_input( $helper );
			if ( is_array( $helper ) ) {
				$this->add_helper( $helper );
			}

		}

	}
1066419
public function set($name, $value)
    {
        $this->helper()->arr()->set($this->object, $name, $value);
    }
1120996
public function setAlias($alias)
    {
        if (is_array($alias)) {
            $this->aliasArray = $this->valideAliasArray($alias);
            $this->aliasName = $this->aliasArrayToName($this->aliasArray);
        } else {
            $this->aliasName = $this->valideAliasName($alias);
            $this->aliasArray = $this->aliasNameToArray($this->aliasName);
        }

        return $this;
    }
767424
public function addAlias($alias, array $target)
    {
        $this->alias[$alias] = isset($this->alias[$alias]) ? array_merge($this->alias[$alias], $target) : $target;

        if (in_array($alias, $this->types)) {
            return;
        }
        $this->types[] = $alias;

    }
837439
public function add(string $alias, ClaimChecker $checker): self
    {
        $this->checkers[$alias] = $checker;

        return $this;
    }
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));
        }
    }
647253
public function set(ModelInterface $model, $alias = null)
    {
        $hash = spl_object_hash($model);

        $this->collection[$hash] = &$model;

        if ($alias !== null) {
            $this->byAlias[$model->alias($alias)] = &$this->collection[$hash];
        }

        $this->byEntity[$this->normalizeNamespace($model->entity())] = &$this->collection[$hash];

        return $this;
    }
1042609
public function add(SourceTypeInterface $type, $alias)
    {
        if ($alias !== $type->getName()) {
            throw new SourceTypeException(sprintf('Mapper source type %s alias is not valid!', $alias));
        }

        $this->types[$alias] = $type;
    }
716452
public function setAlias($alias = null)
    {
        if (!empty($alias)) {
            $this->query['alias'] = $alias;
        } else {
            unset($this->query['alias']);
        }
        return $this;
    }
954554
public function setConvertedValue($value, $alias = null)
    {
        if ($alias) {
            $this->convertedAliasValue[$alias] = $value;
        } else {
            $this->convertedValue = $value;
        }
    }
370212
public static function registerHelper($name, $helper)
    {
        Argument::i()
            //Argument 1 must be a string
            ->test(1, 'string')
            //Argument 2 must be a Closure of some kind
            ->test(2, 'Closure');
        
        self::$helpers[$name] = $helper;
    }
938356
public function set(object $object, string $alias = null)
    {
        $class = get_class($object);
        $this->instances[$class] = $object;

        if (isset($alias)) {
            $this->addAlias($alias, $class);
        }

        $interfaces = class_implements($object);
        if (is_array($interfaces)) {
            foreach ($interfaces as $i) {
                $this->addInterface($i, $class);
            }
        }

        return $this;
    }
511517
protected function helper($helperName)
    {
        if (!isset($this->helpers[$helperName])) {
            throw new \InvalidArgumentException('Unable to locate controller helper: ' . $helperName);
        }

        return $this->helpers[$helperName];
    }
787089
public function from($table, $alias = null)
    {
        if ($alias === null) {
            $this->from[] = $this->grammar->buildId($table);
        } else {
            $this->from[] = $this->grammar->buildIdWithAlias($table, $alias);
        }

        return $this;
    }