protected function copyBaseFiles()
{
if ($this->getManifest()->files) {
if ($this->route === 'update') {
$result = $this->parent->parseFiles($this->getManifest()->files, 0, $this->oldFiles);
} else {
$result = $this->parent->parseFiles($this->getManifest()->files);
}
if ($result === false) {
throw new \RuntimeException(Text::sprintf('JLIB_INSTALLER_ABORT_COMP_FAIL_SITE_FILES', Text::_('JLIB_INSTALLER_' . strtoupper($this->route))));
}
}
if ($this->getManifest()->administration->files) {
if ($this->route === 'update') {
$result = $this->parent->parseFiles($this->getManifest()->administration->files, 1, $this->oldAdminFiles);
} else {
$result = $this->parent->parseFiles($this->getManifest()->administration->files, 1);
}
if ($result === false) {
throw new \RuntimeException(Text::sprintf('JLIB_INSTALLER_ABORT_COMP_FAIL_ADMIN_FILES', Text::_('JLIB_INSTALLER_' . strtoupper($this->route))));
}
}
if ($this->getManifest()->api->files) {
if ($this->route === 'update') {
$result = $this->parent->parseFiles($this->getManifest()->api->files, 3, $this->oldApiFiles);
} else {
$result = $this->parent->parseFiles($this->getManifest()->api->files, 3);
}
if ($result === false) {
throw new \RuntimeException(Text::sprintf('JLIB_INSTALLER_ABORT_COMP_FAIL_API_FILES', Text::_('JLIB_INSTALLER_' . strtoupper($this->route))));
}
}
if ($this->manifest_script) {
$path['src'] = $this->parent->getPath('source') . '/' . $this->manifest_script;
$path['dest'] = $this->parent->getPath('extension_administrator') . '/' . $this->manifest_script;
if ($this->parent->isOverwrite() || !file_exists($path['dest'])) {
if (!$this->parent->copyFiles(array($path))) {
throw new \RuntimeException(Text::sprintf('JLIB_INSTALLER_ABORT_MANIFEST', Text::_('JLIB_INSTALLER_' . strtoupper($this->route))));
}
}
}
}