protected function setupInstallPaths()
{
$group = (string) $this->getManifest()->libraryname;
if (!$group) {
throw new \RuntimeException(Text::_('JLIB_INSTALLER_ABORT_LIB_INSTALL_NOFILE'));
}
$restrictedFolders = array('php-encryption', 'phpass', 'src', 'vendor');
if (in_array($group, $restrictedFolders)) {
throw new \RuntimeException(Text::_('JLIB_INSTALLER_ABORT_LIB_INSTALL_CORE_FOLDER'));
}
$this->parent->setPath('extension_root', JPATH_PLATFORM . '/' . implode(DIRECTORY_SEPARATOR, explode('/', $group)));
}