Back to InstallerAdapter class

Method setupScriptfile

protected void
setupScriptfile
()
Setup the manifest script file for those adapters that use it.
Returns
  • void
Since
  • 3.4

Method setupScriptfile - Source code

/**
 * Setup the manifest script file for those adapters that use it.
 *
 * @return  void
 *
 * @since   3.4
 */
protected function setupScriptfile()
{
    // If there is a manifest class file, lets load it; we'll copy it later (don't have dest yet)
    $manifestScript = (string) $this->getManifest()->scriptfile;
    if ($manifestScript) {
        $manifestScriptFile = $this->parent->getPath('source') . '/' . $manifestScript;
        $classname = $this->getScriptClassName();
        \JLoader::register($classname, $manifestScriptFile);
        if (class_exists($classname)) {
            // Create a new instance
            $this->parent->manifestClass = new $classname($this);
            // And set this so we can copy it later
            $this->manifest_script = $manifestScript;
        }
    }
}