Back to Manifest class

Method loadManifestFromXml

public bool
loadManifestFromXml
(mixed $xmlfile)
Load a manifest from a file
Parameters
  • string $xmlfile Path to file to load
Returns
  • bool
Since
  • 3.1
Class: Manifest
Project: Joomla

Method loadManifestFromXml - Source code

/**
 * Load a manifest from a file
 *
 * @param   string  $xmlfile  Path to file to load
 *
 * @return  boolean
 *
 * @since   3.1
 */
public function loadManifestFromXml($xmlfile)
{
    $this->manifest_file = basename($xmlfile, '.xml');
    $xml = simplexml_load_file($xmlfile);
    if (!$xml) {
        $this->_errors[] = Text::sprintf('JLIB_INSTALLER_ERROR_LOAD_XML', $xmlfile);
        return false;
    } else {
        $this->loadManifestFromData($xml);
        return true;
    }
}