JOOMLA中国
  • Joomla中国首页
  • 社区
  • 教程
  • 应用市场
  • B计划
Joomla! Framework TM
  • Namespace
  • Class
  • Tree
  • Deprecated

Namespaces

  • Composer
    • Autoload
  • Joomla
    • Application
      • Cli
        • Output
          • Processor
      • Web
    • Data
    • DI
      • Exception
    • Event
    • Filter
    • Input
    • Ldap
    • Registry
      • Format
    • Session
      • Storage
    • String
    • Uri
    • Utilities
  • None
  • PasswordCompat
    • binary
  • PHP
  • Psr
    • Log
  • Symfony
    • Component
      • Yaml
        • Exception
    • Polyfill
      • Util

Classes

  • CallbackFilterIterator
  • ComposerAutoloaderInit205c915b9c7d3e718e7c95793ee67ffe
  • easyparse
  • EasyPeasyICS
  • FOFAutoloaderComponent
  • FOFAutoloaderFof
  • FOFConfigDomainDispatcher
  • FOFConfigDomainTables
  • FOFConfigDomainViews
  • FOFConfigProvider
  • FOFController
  • FOFDatabase
  • FOFDatabaseDriver
  • FOFDatabaseDriverJoomla
  • FOFDatabaseDriverMysql
  • FOFDatabaseDriverMysqli
  • FOFDatabaseDriverOracle
  • FOFDatabaseDriverPdo
  • FOFDatabaseDriverPdomysql
  • FOFDatabaseDriverPostgresql
  • FOFDatabaseDriverSqlazure
  • FOFDatabaseDriverSqlite
  • FOFDatabaseDriverSqlsrv
  • FOFDatabaseFactory
  • FOFDatabaseInstaller
  • FOFDatabaseIterator
  • FOFDatabaseIteratorAzure
  • FOFDatabaseIteratorMysql
  • FOFDatabaseIteratorMysqli
  • FOFDatabaseIteratorOracle
  • FOFDatabaseIteratorPdo
  • FOFDatabaseIteratorPdomysql
  • FOFDatabaseIteratorPostgresql
  • FOFDatabaseIteratorSqlite
  • FOFDatabaseIteratorSqlsrv
  • FOFDatabaseQuery
  • FOFDatabaseQueryElement
  • FOFDatabaseQueryMysql
  • FOFDatabaseQueryMysqli
  • FOFDatabaseQueryOracle
  • FOFDatabaseQueryPdo
  • FOFDatabaseQueryPdomysql
  • FOFDatabaseQueryPostgresql
  • FOFDatabaseQuerySqlazure
  • FOFDatabaseQuerySqlite
  • FOFDatabaseQuerySqlsrv
  • FOFDispatcher
  • FOFDownload
  • FOFDownloadAdapterAbstract
  • FOFDownloadAdapterCurl
  • FOFDownloadAdapterFopen
  • FOFEncryptAes
  • FOFEncryptAesAbstract
  • FOFEncryptAesMcrypt
  • FOFEncryptAesOpenssl
  • FOFEncryptBase32
  • FOFEncryptRandval
  • FOFEncryptTotp
  • FOFForm
  • FOFFormFieldAccesslevel
  • FOFFormFieldActions
  • FOFFormFieldButton
  • FOFFormFieldCachehandler
  • FOFFormFieldCalendar
  • FOFFormFieldCaptcha
  • FOFFormFieldCheckbox
  • FOFFormFieldCheckboxes
  • FOFFormFieldComponents
  • FOFFormFieldEditor
  • FOFFormFieldEmail
  • FOFFormFieldGroupedbutton
  • FOFFormFieldGroupedlist
  • FOFFormFieldHidden
  • FOFFormFieldImage
  • FOFFormFieldImagelist
  • FOFFormFieldInteger
  • FOFFormFieldLanguage
  • FOFFormFieldList
  • FOFFormFieldMedia
  • FOFFormFieldModel
  • FOFFormFieldOrdering
  • FOFFormFieldPassword
  • FOFFormFieldPlugins
  • FOFFormFieldPublished
  • FOFFormFieldRadio
  • FOFFormFieldRelation
  • FOFFormFieldRules
  • FOFFormFieldSelectrow
  • FOFFormFieldSessionhandler
  • FOFFormFieldSpacer
  • FOFFormFieldSql
  • FOFFormFieldTag
  • FOFFormFieldTel
  • FOFFormFieldText
  • FOFFormFieldTextarea
  • FOFFormFieldTimezone
  • FOFFormFieldTitle
  • FOFFormFieldUrl
  • FOFFormFieldUser
  • FOFFormFieldUsergroup
  • FOFFormHeader
  • FOFFormHeaderAccesslevel
  • FOFFormHeaderField
  • FOFFormHeaderFielddate
  • FOFFormHeaderFieldfilterable
  • FOFFormHeaderFieldsearchable
  • FOFFormHeaderFieldselectable
  • FOFFormHeaderFieldsql
  • FOFFormHeaderFilterdate
  • FOFFormHeaderFilterfilterable
  • FOFFormHeaderFiltersearchable
  • FOFFormHeaderFilterselectable
  • FOFFormHeaderFiltersql
  • FOFFormHeaderLanguage
  • FOFFormHeaderModel
  • FOFFormHeaderOrdering
  • FOFFormHeaderPublished
  • FOFFormHeaderRowselect
  • FOFFormHelper
  • FOFHalDocument
  • FOFHalLink
  • FOFHalLinks
  • FOFHalRenderJson
  • FOFInflector
  • FOFInput
  • FOFIntegrationJoomlaFilesystem
  • FOFIntegrationJoomlaPlatform
  • FOFLayoutFile
  • FOFLayoutHelper
  • FOFLess
  • FOFLessFormatterClassic
  • FOFLessFormatterCompressed
  • FOFLessFormatterJoomla
  • FOFLessFormatterLessjs
  • FOFLessParser
  • FOFModel
  • FOFModelBehavior
  • FOFModelBehaviorAccess
  • FOFModelBehaviorEmptynonzero
  • FOFModelBehaviorEnabled
  • FOFModelBehaviorFilters
  • FOFModelBehaviorLanguage
  • FOFModelBehaviorPrivate
  • FOFModelDispatcherBehavior
  • FOFModelField
  • FOFModelFieldBoolean
  • FOFModelFieldDate
  • FOFModelFieldNumber
  • FOFModelFieldText
  • FOFPlatform
  • FOFPlatformFilesystem
  • FOFQueryAbstract
  • FOFRenderAbstract
  • FOFRenderJoomla
  • FOFRenderJoomla3
  • FOFRenderStrapper
  • FOFStringUtils
  • FOFTable
  • FOFTableBehavior
  • FOFTableBehaviorAssets
  • FOFTableBehaviorContenthistory
  • FOFTableBehaviorTags
  • FOFTableDispatcherBehavior
  • FOFTableNested
  • FOFTableRelations
  • FOFTemplateUtils
  • FOFToolbar
  • FOFUtilsArray
  • FOFUtilsCacheCleaner
  • FOFUtilsConfigHelper
  • FOFUtilsFilescheck
  • FOFUtilsIniParser
  • FOFUtilsInstallscript
  • FOFUtilsIp
  • FOFUtilsObject
  • FOFUtilsObservableDispatcher
  • FOFUtilsObservableEvent
  • FOFUtilsPhpfunc
  • FOFUtilsTimer
  • FOFUtilsUpdate
  • FOFUtilsUpdateCollection
  • FOFUtilsUpdateExtension
  • FOFUtilsUpdateJoomla
  • FOFView
  • FOFViewCsv
  • FOFViewForm
  • FOFViewHtml
  • FOFViewJson
  • FOFViewRaw
  • idna_convert
  • JAccess
  • JAccessRule
  • JAccessRules
  • JAccessWrapperAccess
  • JAdapter
  • JAdapterInstance
  • JApplication
  • JApplicationAdministrator
  • JApplicationBase
  • JApplicationCli
  • JApplicationCms
  • JApplicationDaemon
  • JApplicationHelper
  • JApplicationSite
  • JApplicationWeb
  • JApplicationWebRouter
  • JApplicationWebRouterBase
  • JApplicationWebRouterRest
  • JArchive
  • JArchiveBzip2
  • JArchiveGzip
  • JArchiveTar
  • JArchiveWrapperArchive
  • JArchiveZip
  • JArrayHelper
  • JAssociationExtensionHelper
  • JAuthentication
  • JAuthenticationHelper
  • JAuthenticationResponse
  • JBrowser
  • JBuffer
  • JButton
  • JCache
  • JCacheController
  • JCacheControllerCallback
  • JCacheControllerOutput
  • JCacheControllerPage
  • JCacheControllerView
  • JCacheStorage
  • JCacheStorageApc
  • JCacheStorageApcu
  • JCacheStorageCachelite
  • JCacheStorageFile
  • JCacheStorageHelper
  • JCacheStorageMemcache
  • JCacheStorageMemcached
  • JCacheStorageRedis
  • JCacheStorageWincache
  • JCacheStorageXcache
  • JCaptcha
  • JCategories
  • JCategoryNode
  • JClassLoader
  • JCli
  • JClientFtp
  • JClientHelper
  • JClientLdap
  • JClientWrapperHelper
  • JComponentHelper
  • JComponentRecord
  • JComponentRouterBase
  • JComponentRouterLegacy
  • JComponentRouterRulesMenu
  • JComponentRouterRulesNomenu
  • JComponentRouterRulesStandard
  • JComponentRouterView
  • JComponentRouterViewconfiguration
  • JControllerAdmin
  • JControllerBase
  • JControllerForm
  • JControllerLegacy
  • JCrypt
  • JCryptCipher3Des
  • JCryptCipherBlowfish
  • JCryptCipherCrypto
  • JCryptCipherMcrypt
  • JCryptCipherRijndael256
  • JCryptCipherSimple
  • JCryptKey
  • JCryptPasswordSimple
  • JDaemon
  • JDatabase
  • JDatabaseDriver
  • JDatabaseDriverMysql
  • JDatabaseDriverMysqli
  • JDatabaseDriverOracle
  • JDatabaseDriverPdo
  • JDatabaseDriverPdomysql
  • JDatabaseDriverPostgresql
  • JDatabaseDriverSqlazure
  • JDatabaseDriverSqlite
  • JDatabaseDriverSqlsrv
  • JDatabaseExporter
  • JDatabaseExporterMysql
  • JDatabaseExporterMysqli
  • JDatabaseExporterPdomysql
  • JDatabaseExporterPostgresql
  • JDatabaseFactory
  • JDatabaseImporter
  • JDatabaseImporterMysql
  • JDatabaseImporterMysqli
  • JDatabaseImporterPdomysql
  • JDatabaseImporterPostgresql
  • JDatabaseInterface
  • JDatabaseIterator
  • JDatabaseIteratorMysql
  • JDatabaseIteratorMysqli
  • JDatabaseIteratorOracle
  • JDatabaseIteratorPdo
  • JDatabaseIteratorPdomysql
  • JDatabaseIteratorPostgresql
  • JDatabaseIteratorSqlazure
  • JDatabaseIteratorSqlite
  • JDatabaseIteratorSqlsrv
  • JDatabaseMysql
  • JDatabaseMysqli
  • JDatabaseQuery
  • JDatabaseQueryElement
  • JDatabaseQueryLimitable
  • JDatabaseQueryMysql
  • JDatabaseQueryMysqli
  • JDatabaseQueryOracle
  • JDatabaseQueryPdo
  • JDatabaseQueryPdomysql
  • JDatabaseQueryPostgresql
  • JDatabaseQueryPreparable
  • JDatabaseQuerySqlazure
  • JDatabaseQuerySqlite
  • JDatabaseQuerySqlsrv
  • JDatabaseSqlazure
  • JDatabaseSqlsrv
  • JDate
  • JDispatcher
  • JDocument
  • JDocumentError
  • JDocumentFeed
  • JDocumentHtml
  • JDocumentImage
  • JDocumentJson
  • JDocumentOpensearch
  • JDocumentRaw
  • JDocumentRenderer
  • JDocumentRendererAtom
  • JDocumentRendererComponent
  • JDocumentRendererFeedAtom
  • JDocumentRendererFeedRss
  • JDocumentRendererHead
  • JDocumentRendererHtmlComponent
  • JDocumentRendererHtmlHead
  • JDocumentRendererHtmlMessage
  • JDocumentRendererHtmlModule
  • JDocumentRendererHtmlModules
  • JDocumentRendererMessage
  • JDocumentRendererModule
  • JDocumentRendererModules
  • JDocumentRendererRSS
  • JDocumentXml
  • JEditor
  • JError
  • JErrorPage
  • JEvent
  • JEventDispatcher
  • JExtension
  • JFacebook
  • JFacebookAlbum
  • JFacebookCheckin
  • JFacebookComment
  • JFacebookEvent
  • JFacebookGroup
  • JFacebookLink
  • JFacebookNote
  • JFacebookOAuth
  • JFacebookObject
  • JFacebookPhoto
  • JFacebookPost
  • JFacebookStatus
  • JFacebookUser
  • JFacebookVideo
  • JFactory
  • JFeed
  • JFeedEnclosure
  • JFeedEntry
  • JFeedFactory
  • JFeedImage
  • JFeedItem
  • JFeedLink
  • JFeedParser
  • JFeedParserAtom
  • JFeedParserRss
  • JFeedParserRssItunes
  • JFeedParserRssMedia
  • JFeedPerson
  • JFile
  • JFilesystemHelper
  • JFilesystemPatcher
  • JFilesystemWrapperFile
  • JFilesystemWrapperFolder
  • JFilesystemWrapperPath
  • JFilterInput
  • JFilterOutput
  • JFilterWrapperOutput
  • JFolder
  • JForm
  • JFormField
  • JFormFieldAccessLevel
  • JFormFieldAliastag
  • JFormFieldAuthor
  • JFormFieldCacheHandler
  • JFormFieldCalendar
  • JFormFieldCaptcha
  • JFormFieldCategory
  • JFormFieldCheckbox
  • JFormFieldCheckboxes
  • JFormFieldChromeStyle
  • JFormFieldColor
  • JFormFieldCombo
  • JFormFieldComponentlayout
  • JFormFieldComponents
  • JFormFieldContenthistory
  • JFormFieldContentlanguage
  • JFormFieldContenttype
  • JFormFieldDatabaseConnection
  • JFormFieldEditor
  • JFormFieldEMail
  • JFormFieldFile
  • JFormFieldFileList
  • JFormFieldFolderList
  • JFormFieldFrontend_Language
  • JFormFieldGroupedList
  • JFormFieldHeadertag
  • JFormFieldHelpsite
  • JFormFieldHidden
  • JFormFieldImageList
  • JFormFieldInteger
  • JFormFieldLanguage
  • JFormFieldLastvisitDateRange
  • JFormFieldLimitbox
  • JFormFieldList
  • JFormFieldMedia
  • JFormFieldMenu
  • JFormFieldMenuitem
  • JFormFieldMeter
  • JFormFieldModulelayout
  • JFormFieldModuleOrder
  • JFormFieldModulePosition
  • JFormFieldModuletag
  • JFormFieldNote
  • JFormFieldNumber
  • JFormFieldOrdering
  • JFormFieldPassword
  • JFormFieldPlugin_Status
  • JFormFieldPlugins
  • JFormFieldPredefinedList
  • JFormFieldRadio
  • JFormFieldRange
  • JFormFieldRegistrationDateRange
  • JFormFieldRepeatable
  • JFormFieldRules
  • JFormFieldSessionHandler
  • JFormFieldSpacer
  • JFormFieldSQL
  • JFormFieldStatus
  • JFormFieldSubform
  • JFormFieldTag
  • JFormFieldTel
  • JFormFieldTemplatestyle
  • JFormFieldText
  • JFormFieldTextarea
  • JFormFieldTimezone
  • JFormFieldUrl
  • JFormFieldUser
  • JFormFieldUserActive
  • JFormFieldUsergroup
  • JFormFieldUserGroupList
  • JFormFieldUserState
  • JFormHelper
  • JFormRule
  • JFormRuleBoolean
  • JFormRuleCalendar
  • JFormRuleCaptcha
  • JFormRuleColor
  • JFormRuleEmail
  • JFormRuleEquals
  • JFormRuleNotequals
  • JFormRuleNumber
  • JFormRuleOptions
  • JFormRulePassword
  • JFormRuleRules
  • JFormRuleTel
  • JFormRuleUrl
  • JFormRuleUsername
  • JFormWrapperHelper
  • JFTP
  • JGithub
  • JGithubAccount
  • JGithubCommits
  • JGithubForks
  • JGithubHooks
  • JGithubHttp
  • JGithubMeta
  • JGithubMilestones
  • JGithubObject
  • JGithubPackage
  • JGithubPackageActivity
  • JGithubPackageActivityEvents
  • JGithubPackageActivityNotifications
  • JGithubPackageActivityStarring
  • JGithubPackageActivityWatching
  • JGithubPackageAuthorization
  • JGithubPackageData
  • JGithubPackageDataBlobs
  • JGithubPackageDataCommits
  • JGithubPackageDataRefs
  • JGithubPackageDataTags
  • JGithubPackageDataTrees
  • JGithubPackageGists
  • JGithubPackageGistsComments
  • JGithubPackageGitignore
  • JGithubPackageIssues
  • JGithubPackageIssuesAssignees
  • JGithubPackageIssuesComments
  • JGithubPackageIssuesEvents
  • JGithubPackageIssuesLabels
  • JGithubPackageIssuesMilestones
  • JGithubPackageMarkdown
  • JGithubPackageOrgs
  • JGithubPackageOrgsMembers
  • JGithubPackageOrgsTeams
  • JGithubPackagePulls
  • JGithubPackagePullsComments
  • JGithubPackageRepositories
  • JGithubPackageRepositoriesCollaborators
  • JGithubPackageRepositoriesComments
  • JGithubPackageRepositoriesCommits
  • JGithubPackageRepositoriesContents
  • JGithubPackageRepositoriesDownloads
  • JGithubPackageRepositoriesForks
  • JGithubPackageRepositoriesHooks
  • JGithubPackageRepositoriesKeys
  • JGithubPackageRepositoriesMerging
  • JGithubPackageRepositoriesStatistics
  • JGithubPackageRepositoriesStatuses
  • JGithubPackageSearch
  • JGithubPackageUsers
  • JGithubPackageUsersEmails
  • JGithubPackageUsersFollowers
  • JGithubPackageUsersKeys
  • JGithubRefs
  • JGithubStatuses
  • JGoogle
  • JGoogleAuth
  • JGoogleAuthOauth2
  • JGoogleData
  • JGoogleDataAdsense
  • JGoogleDataCalendar
  • JGoogleDataPicasa
  • JGoogleDataPicasaAlbum
  • JGoogleDataPicasaPhoto
  • JGoogleDataPlus
  • JGoogleDataPlusActivities
  • JGoogleDataPlusComments
  • JGoogleDataPlusPeople
  • JGoogleEmbed
  • JGoogleEmbedAnalytics
  • JGoogleEmbedMaps
  • JGrid
  • JHelp
  • JHelper
  • JHelperContent
  • JHelperContenthistory
  • JHelperMedia
  • JHelperRoute
  • JHelperTags
  • JHelperUsergroups
  • JHtml
  • JHtmlAccess
  • JHtmlActionsDropdown
  • JHtmlBatch
  • JHtmlBehavior
  • JHtmlBootstrap
  • JHtmlCategory
  • JHtmlContent
  • JHtmlContentLanguage
  • JHtmlDate
  • JHtmlDebug
  • JHtmlDropdown
  • JHtmlEmail
  • JHtmlForm
  • JHtmlFormbehavior
  • JHtmlGrid
  • JHtmlIcons
  • JHtmlJGrid
  • JHtmlJquery
  • JHtmlLinks
  • JHtmlList
  • JHtmlMenu
  • JHtmlNumber
  • JHtmlRules
  • JHtmlSearchtools
  • JHtmlSelect
  • JHtmlSidebar
  • JHtmlSliders
  • JHtmlSortablelist
  • JHtmlString
  • JHtmlTabs
  • JHtmlTag
  • JHtmlTel
  • JHtmlUser
  • JHttp
  • JHttpFactory
  • JHttpResponse
  • JHttpTransportCurl
  • JHttpTransportSocket
  • JHttpTransportStream
  • JHttpWrapperFactory
  • JImage
  • JImageFilter
  • JImageFilterBackgroundfill
  • JImageFilterBrightness
  • JImageFilterContrast
  • JImageFilterEdgedetect
  • JImageFilterEmboss
  • JImageFilterGrayscale
  • JImageFilterNegate
  • JImageFilterSketchy
  • JImageFilterSmooth
  • JInput
  • JInputCli
  • JInputCookie
  • JInputFiles
  • JInputJSON
  • JInstaller
  • JInstallerAdapter
  • JInstallerAdapterComponent
  • JInstallerAdapterFile
  • JInstallerAdapterLanguage
  • JInstallerAdapterLibrary
  • JInstallerAdapterModule
  • JInstallerAdapterPackage
  • JInstallerAdapterPlugin
  • JInstallerAdapterTemplate
  • JInstallerComponent
  • JInstallerExtension
  • JInstallerFile
  • JInstallerHelper
  • JInstallerLanguage
  • JInstallerLibrary
  • JInstallerManifest
  • JInstallerManifestLibrary
  • JInstallerManifestPackage
  • JInstallerModule
  • JInstallerPackage
  • JInstallerPlugin
  • JInstallerScript
  • JInstallerTemplate
  • JKeychain
  • JLanguage
  • JLanguageAssociations
  • JLanguageHelper
  • JLanguageMultilang
  • JLanguageStemmer
  • JLanguageStemmerPorteren
  • JLanguageTransliterate
  • JLanguageWrapperHelper
  • JLanguageWrapperText
  • JLanguageWrapperTransliterate
  • JLayoutBase
  • JLayoutFile
  • JLayoutHelper
  • JLDAP
  • JLess
  • JLessFormatterJoomla
  • JLibraryHelper
  • JLinkedin
  • JLinkedinCommunications
  • JLinkedinCompanies
  • JLinkedinGroups
  • JLinkedinJobs
  • JLinkedinOauth
  • JLinkedinObject
  • JLinkedinPeople
  • JLinkedinStream
  • JLoader
  • JLog
  • JLogEntry
  • JLogger
  • JLogLogger
  • JLogLoggerCallback
  • JLogLoggerDatabase
  • JLogLoggerEcho
  • JLogLoggerFormattedtext
  • JLogLoggerMessagequeue
  • JLogLoggerSyslog
  • JLogLoggerW3c
  • JMail
  • JMailHelper
  • JMailWrapperHelper
  • JMediawiki
  • JMediawikiCategories
  • JMediawikiHttp
  • JMediawikiImages
  • JMediawikiLinks
  • JMediawikiObject
  • JMediawikiPages
  • JMediawikiSearch
  • JMediawikiSites
  • JMediawikiUsers
  • JMenu
  • JMenuAdministrator
  • JMenuItem
  • JMenuSite
  • JMicrodata
  • JModelAdmin
  • JModelBase
  • JModelDatabase
  • JModelForm
  • JModelItem
  • JModelLegacy
  • JModelList
  • JModuleHelper
  • JNode
  • JOAuth1Client
  • JOAuth2Client
  • JObject
  • JObservable
  • JObserver
  • JObserverMapper
  • JObserverUpdater
  • JObserverWrapperMapper
  • JOpenSearchImage
  • JOpenSearchUrl
  • JOpenstreetmap
  • JOpenstreetmapChangesets
  • JOpenstreetmapElements
  • JOpenstreetmapGps
  • JOpenstreetmapInfo
  • JOpenstreetmapOauth
  • JOpenstreetmapObject
  • JOpenstreetmapUser
  • JPagination
  • JPaginationObject
  • JPath
  • JPathway
  • JPathwaySite
  • JPlatform
  • JPlugin
  • JPluginHelper
  • JProfiler
  • JRequest
  • JResponse
  • JResponseJson
  • JRoute
  • JRouter
  • JRouterAdministrator
  • JRouterSite
  • JRouteWrapperRoute
  • JRule
  • JRules
  • JSchemaChangeitem
  • JSchemaChangeitemMysql
  • JSchemaChangeitemPostgresql
  • JSchemaChangeitemSqlsrv
  • JSchemaChangeset
  • JSearchHelper
  • JSession
  • JSessionHandlerJoomla
  • JSessionHandlerNative
  • JSessionStorage
  • JSessionStorageApc
  • JSessionStorageDatabase
  • JSessionStorageMemcache
  • JSessionStorageMemcached
  • JSessionStorageNone
  • JSessionStorageWincache
  • JSessionStorageXcache
  • JSimplecrypt
  • JSimplepieFactory
  • JStream
  • JStreamString
  • JString
  • JStringController
  • JStringPunycode
  • JStringWrapperNormalise
  • JStringWrapperPunycode
  • JTable
  • JTableAsset
  • JTableCategory
  • JTableContent
  • JTableContenthistory
  • JTableContenttype
  • JTableCorecontent
  • JTableExtension
  • JTableInterface
  • JTableLanguage
  • JTableMenu
  • JTableMenuType
  • JTableModule
  • JTableNested
  • JTableObserver
  • JTableObserverContenthistory
  • JTableObserverTags
  • JTableSession
  • JTableUcm
  • JTableUpdate
  • JTableUpdatesite
  • JTableUser
  • JTableUsergroup
  • JTableViewlevel
  • JText
  • JToolbar
  • JToolbarButton
  • JToolbarButtonConfirm
  • JToolbarButtonCustom
  • JToolbarButtonHelp
  • JToolbarButtonLink
  • JToolbarButtonPopup
  • JToolbarButtonSeparator
  • JToolbarButtonSlider
  • JToolbarButtonStandard
  • JTree
  • JTwitter
  • JTwitterBlock
  • JTwitterDirectmessages
  • JTwitterFavorites
  • JTwitterFriends
  • JTwitterHelp
  • JTwitterLists
  • JTwitterOAuth
  • JTwitterObject
  • JTwitterPlaces
  • JTwitterProfile
  • JTwittersearch
  • JTwitterStatuses
  • JTwitterTrends
  • JTwitterUsers
  • JUcmBase
  • JUcmContent
  • JUcmType
  • JUpdate
  • JUpdateAdapter
  • JUpdater
  • JUpdaterCollection
  • JUpdaterExtension
  • JUri
  • JUser
  • JUserHelper
  • JUserWrapperHelper
  • JUtility
  • JVersion
  • JViewBase
  • JViewCategories
  • JViewCategory
  • JViewCategoryfeed
  • JViewHtml
  • JViewLegacy
  • JWeb
  • JWebClient
  • JXMLElement
  • lessc
  • lessc_formatter_classic
  • lessc_formatter_compressed
  • lessc_formatter_lessjs
  • lessc_parser
  • lessify
  • Net_IDNA_php4
  • nodecounter
  • ntlm_sasl_client_class
  • PHPMailer
  • PHPMailerOAuth
  • PHPMailerOAuthGoogle
  • POP3
  • SimplePie
  • SimplePie_Author
  • SimplePie_Autoloader
  • SimplePie_Cache
  • SimplePie_Cache_DB
  • SimplePie_Cache_File
  • SimplePie_Cache_Memcache
  • SimplePie_Cache_MySQL
  • SimplePie_Caption
  • SimplePie_Category
  • SimplePie_Content_Type_Sniffer
  • SimplePie_Copyright
  • SimplePie_Core
  • SimplePie_Credit
  • SimplePie_Decode_HTML_Entities
  • SimplePie_Enclosure
  • SimplePie_File
  • SimplePie_gzdecode
  • SimplePie_HTTP_Parser
  • SimplePie_IRI
  • SimplePie_Item
  • SimplePie_Locator
  • SimplePie_Misc
  • SimplePie_Net_IPv6
  • SimplePie_Parse_Date
  • SimplePie_Parser
  • SimplePie_Rating
  • SimplePie_Registry
  • SimplePie_Restriction
  • SimplePie_Sanitize
  • SimplePie_Source
  • SimplePie_XML_Declaration_Parser
  • SMTP
  • tagparse
  • TypeError

Interfaces

  • FOFConfigDomainInterface
  • FOFDatabaseInterface
  • FOFDatabaseQueryLimitable
  • FOFDatabaseQueryPreparable
  • FOFDownloadInterface
  • FOFEncryptAesInterface
  • FOFEncryptRandvalinterface
  • FOFFormField
  • FOFHalRenderInterface
  • FOFPlatformFilesystemInterface
  • FOFPlatformInterface
  • JArchiveExtractable
  • JAssociationExtensionInterface
  • JCacheException
  • JComponentRouterInterface
  • JComponentRouterRulesInterface
  • JController
  • JCryptCipher
  • JCryptPassword
  • JFeedParserNamespace
  • JHttpTransport
  • JLayout
  • JModel
  • JObservableInterface
  • JObserverInterface
  • JObserverUpdaterInterface
  • JSessionHandlerInterface
  • JsonSerializable
  • JUcm
  • JView
  • SimplePie_Cache_Base

Exceptions

  • Error
  • JAccessExceptionNotallowed
  • JCacheExceptionConnecting
  • JCacheExceptionUnsupported
  • JComponentExceptionMissing
  • JDatabaseException
  • JDatabaseExceptionConnecting
  • JDatabaseExceptionExecuting
  • JDatabaseExceptionUnsupported
  • JException
  • JSessionExceptionUnsupported
  • LogException
  • phpmailerException
  • SimplePie_Exception

Constants

  • JERROR_CALLBACK_NOT_CALLABLE
  • JERROR_ILLEGAL_MODE
  • JERROR_ILLEGAL_OPTIONS
  • JREQUEST_ALLOWHTML
  • JREQUEST_ALLOWRAW
  • JREQUEST_NOTRIM
  • JROUTER_MODE_RAW
  • JROUTER_MODE_SEF

Functions

  • __autoload
  • array_column
  • boolval
  • composerRequire205c915b9c7d3e718e7c95793ee67ffe
  • gzopen
  • gzseek
  • gztell
  • hash_equals
  • hash_pbkdf2
  • HTMLFilter
  • jexit
  • jimport
  • json_last_error_msg
  • ldap_escape
  • password_get_info
  • password_hash
  • password_needs_rehash
  • password_verify
  • PHPMailerAutoload
  • random_bytes
  • random_int
  • RandomCompat_intval
  • RandomCompat_strlen
  • RandomCompat_substr
  • tln_body2div
  • tln_casenormalize
  • tln_deent
  • tln_defang
  • tln_findnxreg
  • tln_findnxstr
  • tln_fixatts
  • tln_fixstyle
  • tln_fixurl
  • tln_getnxtag
  • tln_sanitize
  • tln_skipspace
  • tln_tagprint
  • tln_unspace
  • utf8_accents_to_ascii
  • utf8_bad_explain
  • utf8_bad_find
  • utf8_bad_findall
  • utf8_bad_identify
  • utf8_bad_replace
  • utf8_bad_strip
  • utf8_byte_position
  • utf8_compliant
  • utf8_from_unicode
  • utf8_ireplace
  • utf8_is_ascii
  • utf8_is_ascii_ctrl
  • utf8_is_valid
  • utf8_is_word_chars
  • utf8_locate_current_chr
  • utf8_locate_next_chr
  • utf8_ltrim
  • utf8_ord
  • utf8_rtrim
  • utf8_specials_pattern
  • utf8_str_pad
  • utf8_str_split
  • utf8_strcasecmp
  • utf8_strcspn
  • utf8_strip_ascii_ctrl
  • utf8_strip_non_ascii
  • utf8_strip_non_ascii_ctrl
  • utf8_strip_specials
  • utf8_stristr
  • utf8_strlen
  • utf8_strpos
  • utf8_strrev
  • utf8_strrpos
  • utf8_strspn
  • utf8_strtolower
  • utf8_strtoupper
  • utf8_substr
  • utf8_substr_replace
  • utf8_to_unicode
  • utf8_trim
  • utf8_ucfirst
  • utf8_ucwords
  • utf8_ucwords_callback
  1 <?php
  2 /**
  3  * @package     Joomla.Libraries
  4  * @subpackage  Installer
  5  *
  6  * @copyright   Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
  7  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  8  */
  9 
 10 defined('JPATH_PLATFORM') or die;
 11 
 12 /**
 13  * Package installer
 14  *
 15  * @since  3.1
 16  */
 17 class JInstallerAdapterPackage extends JInstallerAdapter
 18 {
 19     /**
 20      * Flag if the internal event callback has been registered
 21      *
 22      * @var    boolean
 23      * @since  3.7.0
 24      */
 25     private static $eventRegistered = false;
 26 
 27     /**
 28      * An array of extension IDs for each installed extension
 29      *
 30      * @var    array
 31      * @since  3.7.0
 32      */
 33     protected $installedIds = array();
 34 
 35     /**
 36      * The results of each installed extensions
 37      *
 38      * @var    array
 39      * @since  3.1
 40      */
 41     protected $results = array();
 42 
 43     /**
 44      * Flag if the adapter supports discover installs
 45      *
 46      * Adapters should override this and set to false if discover install is unsupported
 47      *
 48      * @var    boolean
 49      * @since  3.4
 50      */
 51     protected $supportsDiscoverInstall = false;
 52 
 53     /**
 54      * Method to check if the extension is present in the filesystem, flags the route as update if so
 55      *
 56      * @return  void
 57      *
 58      * @since   3.4
 59      * @throws  RuntimeException
 60      */
 61     protected function checkExtensionInFilesystem()
 62     {
 63         // If the package manifest already exists, then we will assume that the package is already installed.
 64         if (file_exists(JPATH_MANIFESTS . '/packages/' . basename($this->parent->getPath('manifest'))))
 65         {
 66             // Look for an update function or update tag
 67             $updateElement = $this->manifest->update;
 68 
 69             // Upgrade manually set or update function available or update tag detected
 70             if ($updateElement || $this->parent->isUpgrade()
 71                 || ($this->parent->manifestClass && method_exists($this->parent->manifestClass, 'update')))
 72             {
 73                 // Force this one
 74                 $this->parent->setOverwrite(true);
 75                 $this->parent->setUpgrade(true);
 76 
 77                 if ($this->currentExtensionId)
 78                 {
 79                     // If there is a matching extension mark this as an update
 80                     $this->setRoute('update');
 81                 }
 82             }
 83             elseif (!$this->parent->isOverwrite())
 84             {
 85                 // We didn't have overwrite set, find an update function or find an update tag so lets call it safe
 86                 throw new RuntimeException(
 87                     JText::sprintf(
 88                         'JLIB_INSTALLER_ABORT_DIRECTORY',
 89                         JText::_('JLIB_INSTALLER_' . $this->route),
 90                         $this->type,
 91                         $this->parent->getPath('extension_root')
 92                     )
 93                 );
 94             }
 95         }
 96     }
 97 
 98     /**
 99      * Method to copy the extension's base files from the `<files>` tag(s) and the manifest file
100      *
101      * @return  void
102      *
103      * @since   3.4
104      * @throws  RuntimeException
105      */
106     protected function copyBaseFiles()
107     {
108         $folder = (string) $this->getManifest()->files->attributes()->folder;
109         $source = $this->parent->getPath('source');
110 
111         if ($folder)
112         {
113             $source .= '/' . $folder;
114         }
115 
116         // Install all necessary files
117         if (!count($this->getManifest()->files->children()))
118         {
119             throw new RuntimeException(
120                 JText::sprintf('JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES',
121                     JText::_('JLIB_INSTALLER_' . strtoupper($this->route))
122                 )
123             );
124         }
125 
126         // Add a callback for the `onExtensionAfterInstall` event so we can receive the installed extension ID
127         if (!self::$eventRegistered)
128         {
129             self::$eventRegistered = true;
130             JEventDispatcher::getInstance()->register('onExtensionAfterInstall', array($this, 'onExtensionAfterInstall'));
131         }
132 
133         foreach ($this->getManifest()->files->children() as $child)
134         {
135             $file = $source . '/' . (string) $child;
136 
137             if (is_dir($file))
138             {
139                 // If it's actually a directory then fill it up
140                 $package = array();
141                 $package['dir'] = $file;
142                 $package['type'] = JInstallerHelper::detectType($file);
143             }
144             else
145             {
146                 // If it's an archive
147                 $package = JInstallerHelper::unpack($file);
148             }
149 
150             $tmpInstaller  = new JInstaller;
151             $installResult = $tmpInstaller->install($package['dir']);
152 
153             if (!$installResult)
154             {
155                 throw new RuntimeException(
156                     JText::sprintf(
157                         'JLIB_INSTALLER_ABORT_PACK_INSTALL_ERROR_EXTENSION',
158                         JText::_('JLIB_INSTALLER_' . strtoupper($this->route)),
159                         basename($file)
160                     )
161                 );
162             }
163 
164             $this->results[] = array(
165                 'name'   => (string) $tmpInstaller->manifest->name,
166                 'result' => $installResult,
167             );
168         }
169     }
170 
171     /**
172      * Method to create the extension root path if necessary
173      *
174      * @return  void
175      *
176      * @since   3.4
177      * @throws  RuntimeException
178      */
179     protected function createExtensionRoot()
180     {
181         /*
182          * For packages, we only need the extension root if copying manifest files; this step will be handled
183          * at that point if necessary
184          */
185     }
186 
187     /**
188      * Method to finalise the installation processing
189      *
190      * @return  void
191      *
192      * @since   3.4
193      * @throws  RuntimeException
194      */
195     protected function finaliseInstall()
196     {
197         // Clobber any possible pending updates
198         /** @var JTableUpdate $update */
199         $update = JTable::getInstance('update');
200         $uid = $update->find(
201             array(
202                 'element' => $this->element,
203                 'type' => $this->type,
204             )
205         );
206 
207         if ($uid)
208         {
209             $update->delete($uid);
210         }
211 
212         // Set the package ID for each of the installed extensions to track the relationship
213         if (!empty($this->installedIds))
214         {
215             $db = $this->db;
216             $query = $db->getQuery(true)
217                 ->update('#__extensions')
218                 ->set($db->quoteName('package_id') . ' = ' . (int) $this->extension->extension_id)
219                 ->where($db->quoteName('extension_id') . ' IN (' . implode(', ', $this->installedIds) . ')');
220 
221             try
222             {
223                 $db->setQuery($query)->execute();
224             }
225             catch (JDatabaseExceptionExecuting $e)
226             {
227                 JLog::add(JText::_('JLIB_INSTALLER_ERROR_PACK_SETTING_PACKAGE_ID'), JLog::WARNING, 'jerror');
228             }
229         }
230 
231         // Lastly, we will copy the manifest file to its appropriate place.
232         $manifest = array();
233         $manifest['src'] = $this->parent->getPath('manifest');
234         $manifest['dest'] = JPATH_MANIFESTS . '/packages/' . basename($this->parent->getPath('manifest'));
235 
236         if (!$this->parent->copyFiles(array($manifest), true))
237         {
238             // Install failed, rollback changes
239             throw new RuntimeException(
240                 JText::sprintf(
241                     'JLIB_INSTALLER_ABORT_PACK_INSTALL_COPY_SETUP',
242                     JText::_('JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_FILES')
243                 )
244             );
245         }
246 
247         // If there is a manifest script, let's copy it.
248         if ($this->manifest_script)
249         {
250             // First, we have to create a folder for the script if one isn't present
251             if (!file_exists($this->parent->getPath('extension_root')))
252             {
253                 if (!JFolder::create($this->parent->getPath('extension_root')))
254                 {
255                     throw new RuntimeException(
256                         JText::sprintf(
257                             'JLIB_INSTALLER_ABORT_CREATE_DIRECTORY',
258                             JText::_('JLIB_INSTALLER_' . $this->route),
259                             $this->parent->getPath('extension_root')
260                         )
261                     );
262                 }
263 
264                 /*
265                  * Since we created the extension directory and will want to remove it if
266                  * we have to roll back the installation, let's add it to the
267                  * installation step stack
268                  */
269 
270                 $this->parent->pushStep(
271                     array(
272                         'type' => 'folder',
273                         'path' => $this->parent->getPath('extension_root'),
274                     )
275                 );
276             }
277 
278             $path['src'] = $this->parent->getPath('source') . '/' . $this->manifest_script;
279             $path['dest'] = $this->parent->getPath('extension_root') . '/' . $this->manifest_script;
280 
281             if ($this->parent->isOverwrite() || !file_exists($path['dest']))
282             {
283                 if (!$this->parent->copyFiles(array($path)))
284                 {
285                     // Install failed, rollback changes
286                     throw new RuntimeException(JText::_('JLIB_INSTALLER_ABORT_PACKAGE_INSTALL_MANIFEST'));
287                 }
288             }
289         }
290     }
291 
292     /**
293      * Get the filtered extension element from the manifest
294      *
295      * @param   string  $element  Optional element name to be converted
296      *
297      * @return  string  The filtered element
298      *
299      * @since   3.4
300      */
301     public function getElement($element = null)
302     {
303         if (!$element)
304         {
305             // Ensure the element is a string
306             $element = (string) $this->getManifest()->packagename;
307 
308             // Filter the name for illegal characters
309             $element = 'pkg_' . JFilterInput::getInstance()->clean($element, 'cmd');
310         }
311 
312         return $element;
313     }
314 
315     /**
316      * Load language from a path
317      *
318      * @param   string  $path  The path of the language.
319      *
320      * @return  void
321      *
322      * @since   3.1
323      */
324     public function loadLanguage($path)
325     {
326         $this->doLoadLanguage($this->getElement(), $path);
327     }
328 
329     /**
330      * Handler for the `onExtensionAfterInstall` event
331      *
332      * @param   JInstaller       $installer  JInstaller instance managing the extension's installation
333      * @param   integer|boolean  $eid        The extension ID of the installed extension on success, boolean false on install failure
334      *
335      * @return  void
336      *
337      * @since   3.7.0
338      */
339     public function onExtensionAfterInstall(JInstaller $installer, $eid)
340     {
341         if ($eid !== false)
342         {
343             $this->installedIds[] = $eid;
344         }
345     }
346 
347     /**
348      * Method to parse optional tags in the manifest
349      *
350      * @return  void
351      *
352      * @since   3.4
353      */
354     protected function parseOptionalTags()
355     {
356         $this->parent->parseLanguages($this->getManifest()->languages);
357     }
358 
359     /**
360      * Method to do any prechecks and setup the install paths for the extension
361      *
362      * @return  void
363      *
364      * @since   3.4
365      * @throws  RuntimeException
366      */
367     protected function setupInstallPaths()
368     {
369         $packagepath = (string) $this->getManifest()->packagename;
370 
371         if (empty($packagepath))
372         {
373             throw new RuntimeException(
374                 JText::sprintf(
375                     'JLIB_INSTALLER_ABORT_PACK_INSTALL_NO_PACK',
376                     JText::_('JLIB_INSTALLER_' . strtoupper($this->route))
377                 )
378             );
379         }
380 
381         $this->parent->setPath('extension_root', JPATH_MANIFESTS . '/packages/' . $packagepath);
382     }
383 
384     /**
385      * Method to store the extension to the database
386      *
387      * @return  void
388      *
389      * @since   3.4
390      * @throws  RuntimeException
391      */
392     protected function storeExtension()
393     {
394         if ($this->currentExtensionId)
395         {
396             if (!$this->parent->isOverwrite())
397             {
398                 // Install failed, roll back changes
399                 throw new RuntimeException(
400                     JText::sprintf(
401                         'JLIB_INSTALLER_ABORT_ALREADY_EXISTS',
402                         JText::_('JLIB_INSTALLER_' . $this->route),
403                         $this->name
404                     )
405                 );
406             }
407 
408             $this->extension->load($this->currentExtensionId);
409             $this->extension->name = $this->name;
410         }
411         else
412         {
413             $this->extension->name = $this->name;
414             $this->extension->type = 'package';
415             $this->extension->element = $this->element;
416 
417             // There is no folder for packages
418             $this->extension->folder = '';
419             $this->extension->enabled = 1;
420             $this->extension->protected = 0;
421             $this->extension->access = 1;
422             $this->extension->client_id = 0;
423 
424             // Custom data
425             $this->extension->custom_data = '';
426             $this->extension->system_data = '';
427             $this->extension->params = $this->parent->getParams();
428         }
429 
430         // Update the manifest cache for the entry
431         $this->extension->manifest_cache = $this->parent->generateManifestCache();
432 
433         if (!$this->extension->store())
434         {
435             // Install failed, roll back changes
436             throw new RuntimeException(
437                 JText::sprintf(
438                     'JLIB_INSTALLER_ABORT_PACK_INSTALL_ROLLBACK',
439                     $this->extension->getError()
440                 )
441             );
442         }
443 
444         // Since we have created a package item, we add it to the installation step stack
445         // so that if we have to rollback the changes we can undo it.
446         $this->parent->pushStep(array('type' => 'extension', 'id' => $this->extension->extension_id));
447     }
448 
449     /**
450      * Executes a custom install script method
451      *
452      * @param   string  $method  The install method to execute
453      *
454      * @return  boolean  True on success
455      *
456      * @since   3.4
457      */
458     protected function triggerManifestScript($method)
459     {
460         ob_start();
461         ob_implicit_flush(false);
462 
463         if ($this->parent->manifestClass && method_exists($this->parent->manifestClass, $method))
464         {
465             switch ($method)
466             {
467                 // The preflight method takes the route as a param
468                 case 'preflight':
469                     if ($this->parent->manifestClass->$method($this->route, $this) === false)
470                     {
471                         // The script failed, rollback changes
472                         throw new RuntimeException(
473                             JText::sprintf(
474                                 'JLIB_INSTALLER_ABORT_INSTALL_CUSTOM_INSTALL_FAILURE',
475                                 JText::_('JLIB_INSTALLER_' . $this->route)
476                             )
477                         );
478                     }
479 
480                     break;
481 
482                 // The postflight method takes the route and a results array as params
483                 case 'postflight':
484                     $this->parent->manifestClass->$method($this->route, $this, $this->results);
485 
486                     break;
487 
488                 // The install, uninstall, and update methods only pass this object as a param
489                 case 'install':
490                 case 'uninstall':
491                 case 'update':
492                     if ($this->parent->manifestClass->$method($this) === false)
493                     {
494                         if ($method !== 'uninstall')
495                         {
496                             // The script failed, rollback changes
497                             throw new RuntimeException(
498                                 JText::sprintf(
499                                     'JLIB_INSTALLER_ABORT_INSTALL_CUSTOM_INSTALL_FAILURE',
500                                     JText::_('JLIB_INSTALLER_' . $this->route)
501                                 )
502                             );
503                         }
504                     }
505 
506                     break;
507             }
508         }
509 
510         // Append to the message object
511         $this->extensionMessage .= ob_get_clean();
512 
513         // If in postflight or uninstall, set the message for display
514         if (($method === 'uninstall' || $method === 'postflight') && $this->extensionMessage !== '')
515         {
516             $this->parent->set('extension_message', $this->extensionMessage);
517         }
518 
519         return true;
520     }
521 
522     /**
523      * Custom uninstall method
524      *
525      * @param   integer  $id  The id of the package to uninstall.
526      *
527      * @return  boolean  True on success
528      *
529      * @since   3.1
530      */
531     public function uninstall($id)
532     {
533         $row = null;
534         $retval = true;
535 
536         $row = JTable::getInstance('extension');
537         $row->load($id);
538 
539         if ($row->protected)
540         {
541             JLog::add(JText::_('JLIB_INSTALLER_ERROR_PACK_UNINSTALL_WARNCOREPACK'), JLog::WARNING, 'jerror');
542 
543             return false;
544         }
545 
546         /*
547          * Does this extension have a parent package?
548          * If so, check if the package disallows individual extensions being uninstalled if the package is not being uninstalled
549          */
550         if ($row->package_id && !$this->parent->isPackageUninstall() && !$this->canUninstallPackageChild($row->package_id))
551         {
552             JLog::add(JText::sprintf('JLIB_INSTALLER_ERROR_CANNOT_UNINSTALL_CHILD_OF_PACKAGE', $row->name), JLog::WARNING, 'jerror');
553 
554             return false;
555         }
556 
557         $manifestFile = JPATH_MANIFESTS . '/packages/' . $row->get('element') . '.xml';
558         $manifest = new JInstallerManifestPackage($manifestFile);
559 
560         // Set the package root path
561         $this->parent->setPath('extension_root', JPATH_MANIFESTS . '/packages/' . $manifest->packagename);
562 
563         // Because packages may not have their own folders we cannot use the standard method of finding an installation manifest
564         if (!file_exists($manifestFile))
565         {
566             // TODO: Fail?
567             JLog::add(JText::_('JLIB_INSTALLER_ERROR_PACK_UNINSTALL_MISSINGMANIFEST'), JLog::WARNING, 'jerror');
568 
569             return false;
570         }
571 
572         $xml = simplexml_load_file($manifestFile);
573 
574         // If we cannot load the XML file return false
575         if (!$xml)
576         {
577             JLog::add(JText::_('JLIB_INSTALLER_ERROR_PACK_UNINSTALL_LOAD_MANIFEST'), JLog::WARNING, 'jerror');
578 
579             return false;
580         }
581 
582         // Check for a valid XML root tag.
583         if ($xml->getName() !== 'extension')
584         {
585             JLog::add(JText::_('JLIB_INSTALLER_ERROR_PACK_UNINSTALL_INVALID_MANIFEST'), JLog::WARNING, 'jerror');
586 
587             return false;
588         }
589 
590         // If there is an manifest class file, let's load it
591         $manifestScript = (string) $manifest->scriptfile;
592 
593         if ($manifestScript)
594         {
595             $manifestScriptFile = $this->parent->getPath('extension_root') . '/' . $manifestScript;
596 
597             // Set the class name
598             $classname = $row->element . 'InstallerScript';
599 
600             JLoader::register($classname, $manifestScriptFile);
601 
602             if (class_exists($classname))
603             {
604                 // Create a new instance
605                 $this->parent->manifestClass = new $classname($this);
606 
607                 // And set this so we can copy it later
608                 $this->set('manifest_script', $manifestScript);
609             }
610         }
611 
612         ob_start();
613         ob_implicit_flush(false);
614 
615         // Run uninstall if possible
616         if ($this->parent->manifestClass && method_exists($this->parent->manifestClass, 'uninstall'))
617         {
618             $this->parent->manifestClass->uninstall($this);
619         }
620 
621         $msg = ob_get_contents();
622         ob_end_clean();
623 
624         if ($msg != '')
625         {
626             $this->parent->set('extension_message', $msg);
627         }
628 
629         $error = false;
630 
631         foreach ($manifest->filelist as $extension)
632         {
633             $tmpInstaller = new JInstaller;
634             $tmpInstaller->setPackageUninstall(true);
635 
636             $id = $this->_getExtensionId($extension->type, $extension->id, $extension->client, $extension->group);
637             $client = JApplicationHelper::getClientInfo($extension->client, true);
638 
639             if ($id)
640             {
641                 if (!$tmpInstaller->uninstall($extension->type, $id, $client->id))
642                 {
643                     $error = true;
644                     JLog::add(JText::sprintf('JLIB_INSTALLER_ERROR_PACK_UNINSTALL_NOT_PROPER', basename($extension->filename)), JLog::WARNING, 'jerror');
645                 }
646             }
647             else
648             {
649                 JLog::add(JText::_('JLIB_INSTALLER_ERROR_PACK_UNINSTALL_UNKNOWN_EXTENSION'), JLog::WARNING, 'jerror');
650             }
651         }
652 
653         // Remove any language files
654         $this->parent->removeFiles($xml->languages);
655 
656         // Clean up manifest file after we're done if there were no errors
657         if (!$error)
658         {
659             JFile::delete($manifestFile);
660             $folder = $this->parent->getPath('extension_root');
661 
662             if (JFolder::exists($folder))
663             {
664                 JFolder::delete($folder);
665             }
666 
667             $row->delete();
668         }
669         else
670         {
671             JLog::add(JText::_('JLIB_INSTALLER_ERROR_PACK_UNINSTALL_MANIFEST_NOT_REMOVED'), JLog::WARNING, 'jerror');
672         }
673 
674         // Return the result up the line
675         return $retval;
676     }
677 
678     /**
679      * Gets the extension id.
680      *
681      * @param   string   $type    The extension type.
682      * @param   string   $id      The name of the extension (the element field).
683      * @param   integer  $client  The application id (0: Joomla CMS site; 1: Joomla CMS administrator).
684      * @param   string   $group   The extension group (mainly for plugins).
685      *
686      * @return  integer
687      *
688      * @since   3.1
689      */
690     protected function _getExtensionId($type, $id, $client, $group)
691     {
692         $db = $this->parent->getDbo();
693 
694         $query = $db->getQuery(true)
695             ->select('extension_id')
696             ->from('#__extensions')
697             ->where('type = ' . $db->quote($type))
698             ->where('element = ' . $db->quote($id));
699 
700         switch ($type)
701         {
702             case 'plugin':
703                 // Plugins have a folder but not a client
704                 $query->where('folder = ' . $db->quote($group));
705                 break;
706 
707             case 'library':
708             case 'package':
709             case 'component':
710                 // Components, packages and libraries don't have a folder or client.
711                 // Included for completeness.
712                 break;
713 
714             case 'language':
715             case 'module':
716             case 'template':
717                 // Languages, modules and templates have a client but not a folder
718                 $client = JApplicationHelper::getClientInfo($client, true);
719                 $query->where('client_id = ' . (int) $client->id);
720                 break;
721         }
722 
723         $db->setQuery($query);
724 
725         // Note: For templates, libraries and packages their unique name is their key.
726         // This means they come out the same way they came in.
727 
728         return $db->loadResult();
729     }
730 
731     /**
732      * Refreshes the extension table cache
733      *
734      * @return  boolean  Result of operation, true if updated, false on failure
735      *
736      * @since   3.1
737      */
738     public function refreshManifestCache()
739     {
740         // Need to find to find where the XML file is since we don't store this normally
741         $manifestPath = JPATH_MANIFESTS . '/packages/' . $this->parent->extension->element . '.xml';
742         $this->parent->manifest = $this->parent->isManifest($manifestPath);
743         $this->parent->setPath('manifest', $manifestPath);
744 
745         $manifest_details = JInstaller::parseXMLInstallFile($this->parent->getPath('manifest'));
746         $this->parent->extension->manifest_cache = json_encode($manifest_details);
747         $this->parent->extension->name = $manifest_details['name'];
748 
749         try
750         {
751             return $this->parent->extension->store();
752         }
753         catch (RuntimeException $e)
754         {
755             JLog::add(JText::_('JLIB_INSTALLER_ERROR_PACK_REFRESH_MANIFEST_CACHE'), JLog::WARNING, 'jerror');
756 
757             return false;
758         }
759     }
760 }
761 
762 /**
763  * Deprecated class placeholder. You should use JInstallerAdapterPackage instead.
764  *
765  * @since       3.1
766  * @deprecated  4.0
767  * @codeCoverageIgnore
768  */
769 class JInstallerPackage extends JInstallerAdapterPackage
770 {
771 }
772 
Joomla! Framework TM API documentation generated by ApiGen 2.8.0
Joomla!® and Joomla! Framework™ are trademarks of Open Source Matters, Inc. in the United States and other countries.