public function getHelper($helper, $config = array())
    {
        $name = (string) $helper;

        if (!isset($this->_helpers[$name])) {
            if (is_string($helper) && strpos($helper, '.') === false) {
                $identifier = clone $this->getIdentifier();
                $identifier->path = array('template','helper');
                $identifier->name = $helper;
            } else {
                $identifier = $this->getIdentifier($helper);
            }
         
            register_default(array(
                'identifier' => $identifier,
                'prefix' => $this
            ));
         
            //Create the template helper
            $helper = $this->getService($identifier, array_merge($config, array('template' => $this)));
            
            //Check the helper interface
            if (!($helper instanceof LibBaseTemplateHelperInterface)) {
                throw new LibBaseTemplateHelperException("Template helper $identifier does not implement LibBaseTemplateHelperInterface");
            }

            $this->_helpers[$name] = $helper;
        }

        return $this->_helpers[$name];
    }
public function getHelper($helper, $config = array())
    {
        $name = (string) $helper;

        if (!isset($this->_helpers[$name])) {
            if (is_string($helper) && strpos($helper, '.') === false) {
                $identifier = clone $this->getIdentifier();
                $identifier->path = array('template','helper');
                $identifier->name = $helper;
            } else {
                $identifier = $this->getIdentifier($helper);
            }
         
            register_default(array(
                'identifier' => $identifier,
                'prefix' => $this
            ));
         
            //Create the template helper
            $helper = $this->getService($identifier, array_merge($config, array('template' => $this)));
            
            //Check the helper interface
            if (!($helper instanceof LibBaseTemplateHelperInterface)) {
                throw new LibBaseTemplateHelperException("Template helper $identifier does not implement LibBaseTemplateHelperInterface");
            }

            $this->_helpers[$name] = $helper;
        }

        return $this->_helpers[$name];
    }
public function getHelper ( $ helper , $ config = array ( ) ) { $ name = ( string ) $ helper ; if ( ! isset ( $ this -> _helpers [ $ name ] ) ) { if ( is_string ( $ helper ) && strpos ( $ helper , '.' ) === false ) { $ identifier = clone $ this -> getIdentifier ( ) ; $ identifier -> path = array ( 'template' , 'helper' ) ; $ identifier -> name = $ helper ; } else { $ identifier = $ this -> getIdentifier ( $ helper ) ; } register_default ( array ( 'identifier' => $ identifier , 'prefix' => $ this ) ) ; //Create the template helper $ helper = $ this -> getService ( $ identifier , array_merge ( $ config , array ( 'template' => $ this ) ) ) ; //Check the helper interface if ( ! ( $ helper instanceof LibBaseTemplateHelperInterface ) ) { throw new LibBaseTemplateHelperException ( "Template helper $identifier does not implement LibBaseTemplateHelperInterface" ) ; } $ this -> _helpers [ $ name ] = $ helper ; } return $ this -> _helpers [ $ name ] ; }
Get a template helper.

@param	mixed	An object that implements AnObjectIdentifiable, an object that
implements AnServiceIdentifierInterface or valid identifier string
@param	mixed	Parameters to be passed to the helper

@return LibBaseTemplateHelperInterface
Get a template helper .