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));
        }
    }
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));
        }
    }
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 ) ) ; } }
Registers a new helper in the compiler

@param $helperName
@throws InvalidHelperException
@throws UnknownHelperException
Registers a new helper in the compiler