function &getValidationObject($package = false)
    {
        if (!class_exists('PEAR_Validate')) {
            require_once 'PEAR/Validate.php';
        }

        if (!$this->_isValid) {
            if (!$this->validate()) {
                $a = false;
                return $a;
            }
        }

        if (isset($this->_channelInfo['validatepackage'])) {
            if ($package == $this->_channelInfo['validatepackage']) {
                // channel validation packages are always validated by PEAR_Validate
                $val = &new PEAR_Validate;
                return $val;
            }

            if (!class_exists(str_replace('.', '_',
                  $this->_channelInfo['validatepackage']['_content']))) {
                if ($this->isIncludeable(str_replace('_', '/',
                      $this->_channelInfo['validatepackage']['_content']) . '.php')) {
                    include_once str_replace('_', '/',
                        $this->_channelInfo['validatepackage']['_content']) . '.php';
                    $vclass = str_replace('.', '_',
                        $this->_channelInfo['validatepackage']['_content']);
                    $val = &new $vclass;
                } else {
                    $a = false;
                    return $a;
                }
            } else {
                $vclass = str_replace('.', '_',
                    $this->_channelInfo['validatepackage']['_content']);
                $val = &new $vclass;
            }
        } else {
            $val = &new PEAR_Validate;
        }

        return $val;
    }
function &getValidationObject($package = false)
    {
        if (!class_exists('PEAR_Validate')) {
            require_once 'PEAR/Validate.php';
        }

        if (!$this->_isValid) {
            if (!$this->validate()) {
                $a = false;
                return $a;
            }
        }

        if (isset($this->_channelInfo['validatepackage'])) {
            if ($package == $this->_channelInfo['validatepackage']) {
                // channel validation packages are always validated by PEAR_Validate
                $val = &new PEAR_Validate;
                return $val;
            }

            if (!class_exists(str_replace('.', '_',
                  $this->_channelInfo['validatepackage']['_content']))) {
                if ($this->isIncludeable(str_replace('_', '/',
                      $this->_channelInfo['validatepackage']['_content']) . '.php')) {
                    include_once str_replace('_', '/',
                        $this->_channelInfo['validatepackage']['_content']) . '.php';
                    $vclass = str_replace('.', '_',
                        $this->_channelInfo['validatepackage']['_content']);
                    $val = &new $vclass;
                } else {
                    $a = false;
                    return $a;
                }
            } else {
                $vclass = str_replace('.', '_',
                    $this->_channelInfo['validatepackage']['_content']);
                $val = &new $vclass;
            }
        } else {
            $val = &new PEAR_Validate;
        }

        return $val;
    }
function & getValidationObject ( $ package = false ) { if ( ! class_exists ( 'PEAR_Validate' ) ) { require_once 'PEAR/Validate.php' ; } if ( ! $ this -> _isValid ) { if ( ! $ this -> validate ( ) ) { $ a = false ; return $ a ; } } if ( isset ( $ this -> _channelInfo [ 'validatepackage' ] ) ) { if ( $ package == $ this -> _channelInfo [ 'validatepackage' ] ) { // channel validation packages are always validated by PEAR_Validate $ val = & new PEAR_Validate ; return $ val ; } if ( ! class_exists ( str_replace ( '.' , '_' , $ this -> _channelInfo [ 'validatepackage' ] [ '_content' ] ) ) ) { if ( $ this -> isIncludeable ( str_replace ( '_' , '/' , $ this -> _channelInfo [ 'validatepackage' ] [ '_content' ] ) . '.php' ) ) { include_once str_replace ( '_' , '/' , $ this -> _channelInfo [ 'validatepackage' ] [ '_content' ] ) . '.php' ; $ vclass = str_replace ( '.' , '_' , $ this -> _channelInfo [ 'validatepackage' ] [ '_content' ] ) ; $ val = & new $ vclass ; } else { $ a = false ; return $ a ; } } else { $ vclass = str_replace ( '.' , '_' , $ this -> _channelInfo [ 'validatepackage' ] [ '_content' ] ) ; $ val = & new $ vclass ; } } else { $ val = & new PEAR_Validate ; } return $ val ; }
Retrieve the object that can be used for custom validation
@param string|false the name of the package to validate.  If the package is
the channel validation package, PEAR_Validate is returned
@return PEAR_Validate|false false is returned if the validation package
cannot be located
Retrieve the object that can be used for custom validation