mvc/View.php
/**
     * Add a view helper
     * If the class name has no namespace, the default namespace used
     * @param string $class_name
     * @param string $nickname
     * @param mixed $param
     * @return object
     */
Add a view helper
If the class name has no namespace, the default namespace used
@param string $class_name
@param string $nickname
@param mixed $param
@return object
Add a view helper If the class name has no namespace the default namespace used @param string $class_name @param string $nickname @param mixed $param @return object
public function addHelper($class_name, $nickname, $param = NULL) {
        if (strpos($class_name, '\\') === FALSE) {
            $class_name = self::_HELPER_NS . $class_name;
        }
        if (! $this->_helpers) {
            $this->_helpers = array();
        } else {
            if (isset($nickname, $this->_helpers)) {
                $added = TRUE;
            }
        }
        if (empty($added)) {
            $this->_helpers[$nickname] = $param === NULL ? new $class_name() : new $class_name($param);
        }
        return $this->_helpers[$nickname];
    }
public function addHelper ( $ class_name , $ nickname , $ param = NULL ) { if ( strpos ( $ class_name , '\\' ) === FALSE ) { $ class_name = self :: _HELPER_NS . $ class_name ; } if ( ! $ this -> _helpers ) { $ this -> _helpers = array ( ) ; } else { if ( isset ( $ nickname , $ this -> _helpers ) ) { $ added = TRUE ; } } if ( empty ( $ added ) ) { $ this -> _helpers [ $ nickname ] = $ param === NULL ? new $ class_name ( ) : new $ class_name ( $ param ) ; } return $ this -> _helpers [ $ nickname ] ; }
Add a view helper
 If the class name has no namespace, the default namespace used
 @param string $class_name
 @param string $nickname
 @param mixed $param
 @return object
Add a view helper If the class name has no namespace the default namespace used @param string $class_name @param string $nickname @param mixed $param @return object