/** * Return an XML document based on the package info (as returned * by the PEAR_Common::infoFrom* methods). * * @param array $pkginfo package info * * @return string XML data * * @access public * @deprecated use a PEAR_PackageFile_v* object's generator instead */ function xmlFromInfo($pkginfo) { include_once 'PEAR/PackageFile.php'; include_once 'PEAR/Config.php'; $config =& PEAR_Config::singleton(); $packagefile =& new PEAR_PackageFile($config); $pf =& $packagefile->fromArray($pkginfo); parent::PEAR_PackageFile_Generator_v1($pf); return $this->toXml(); }
/** * Return an XML document based on the package info (as returned * by the PEAR_Common::infoFrom* methods). * * @param array $pkginfo package info * * @return string XML data * * @access public * @deprecated use a PEAR_PackageFile_v* object's generator instead */ function xmlFromInfo($pkginfo) { include_once 'PEAR/PackageFile.php'; include_once 'PEAR/Config.php'; $config =& PEAR_Config::singleton(); $packagefile =& new PEAR_PackageFile($config); $pf =& $packagefile->fromArray($pkginfo); parent::PEAR_PackageFile_Generator_v1($pf); $ret = $this->toXml(); if (!$ret) { $errors = $pf->getValidationWarnings(); return PEAR::raiseError('Invalid package.xml file', null, null, null, $errors); } return $ret; }