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 use Joomla\Utilities\ArrayHelper;
 13 
 14 jimport('joomla.filesystem.folder');
 15 
 16 /**
 17  * Module installer
 18  *
 19  * @since  3.1
 20  */
 21 class JInstallerAdapterModule extends JInstallerAdapter
 22 {
 23     /**
 24      * The install client ID
 25      *
 26      * @var    integer
 27      * @since  3.4
 28      */
 29     protected $clientId;
 30 
 31     /**
 32      * `<scriptfile>` element of the extension manifest
 33      *
 34      * @var    object
 35      * @since  3.1
 36      */
 37     protected $scriptElement = null;
 38 
 39     /**
 40      * Method to check if the extension is already present in the database
 41      *
 42      * @return  void
 43      *
 44      * @since   3.4
 45      * @throws  RuntimeException
 46      */
 47     protected function checkExistingExtension()
 48     {
 49         try
 50         {
 51             $this->currentExtensionId = $this->extension->find(
 52                 array(
 53                     'element'   => $this->element,
 54                     'type'      => $this->type,
 55                     'client_id' => $this->clientId,
 56                 )
 57             );
 58         }
 59         catch (RuntimeException $e)
 60         {
 61             // Install failed, roll back changes
 62             throw new RuntimeException(
 63                 JText::sprintf(
 64                     'JLIB_INSTALLER_ABORT_ROLLBACK',
 65                     JText::_('JLIB_INSTALLER_' . $this->route),
 66                     $e->getMessage()
 67                 ),
 68                 $e->getCode(),
 69                 $e
 70             );
 71         }
 72     }
 73 
 74     /**
 75      * Method to copy the extension's base files from the `<files>` tag(s) and the manifest file
 76      *
 77      * @return  void
 78      *
 79      * @since   3.4
 80      * @throws  RuntimeException
 81      */
 82     protected function copyBaseFiles()
 83     {
 84         // Copy all necessary files
 85         if ($this->parent->parseFiles($this->getManifest()->files, -1) === false)
 86         {
 87             throw new RuntimeException(JText::_('JLIB_INSTALLER_ABORT_MOD_COPY_FILES'));
 88         }
 89 
 90         // If there is a manifest script, let's copy it.
 91         if ($this->manifest_script)
 92         {
 93             $path['src']  = $this->parent->getPath('source') . '/' . $this->manifest_script;
 94             $path['dest'] = $this->parent->getPath('extension_root') . '/' . $this->manifest_script;
 95 
 96             if ($this->parent->isOverwrite() || !file_exists($path['dest']))
 97             {
 98                 if (!$this->parent->copyFiles(array($path)))
 99                 {
100                     // Install failed, rollback changes
101                     throw new RuntimeException(JText::_('JLIB_INSTALLER_ABORT_MOD_INSTALL_MANIFEST'));
102                 }
103             }
104         }
105     }
106 
107     /**
108      * Method to finalise the installation processing
109      *
110      * @return  void
111      *
112      * @since   3.4
113      * @throws  RuntimeException
114      */
115     protected function finaliseInstall()
116     {
117         // Clobber any possible pending updates
118         $update = JTable::getInstance('update');
119         $uid    = $update->find(
120             array(
121                 'element'   => $this->element,
122                 'type'      => 'module',
123                 'client_id' => $this->clientId,
124             )
125         );
126 
127         if ($uid)
128         {
129             $update->delete($uid);
130         }
131 
132         // Lastly, we will copy the manifest file to its appropriate place.
133         if ($this->route !== 'discover_install')
134         {
135             if (!$this->parent->copyManifest(-1))
136             {
137                 // Install failed, rollback changes
138                 throw new RuntimeException(JText::_('JLIB_INSTALLER_ABORT_MOD_INSTALL_COPY_SETUP'));
139             }
140         }
141     }
142 
143     /**
144      * Get the filtered extension element from the manifest
145      *
146      * @param   string  $element  Optional element name to be converted
147      *
148      * @return  string  The filtered element
149      *
150      * @since   3.4
151      */
152     public function getElement($element = null)
153     {
154         if (!$element)
155         {
156             if (count($this->getManifest()->files->children()))
157             {
158                 foreach ($this->getManifest()->files->children() as $file)
159                 {
160                     if ((string) $file->attributes()->module)
161                     {
162                         $element = strtolower((string) $file->attributes()->module);
163 
164                         break;
165                     }
166                 }
167             }
168         }
169 
170         return $element;
171     }
172 
173     /**
174      * Custom loadLanguage method
175      *
176      * @param   string  $path  The path where we find language files
177      *
178      * @return  void
179      *
180      * @since   3.4
181      */
182     public function loadLanguage($path = null)
183     {
184         $source = $this->parent->getPath('source');
185         $client = $this->parent->extension->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE;
186 
187         if (!$source)
188         {
189             $this->parent->setPath('source', $client . '/modules/' . $this->parent->extension->element);
190         }
191 
192         $this->setManifest($this->parent->getManifest());
193 
194         if ($this->getManifest()->files)
195         {
196             $extension = $this->getElement();
197 
198             if ($extension)
199             {
200                 $source = $path ?: ($this->parent->extension->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE) . '/modules/' . $extension;
201                 $folder = (string) $this->getManifest()->files->attributes()->folder;
202 
203                 if ($folder && file_exists($path . '/' . $folder))
204                 {
205                     $source = $path . '/' . $folder;
206                 }
207 
208                 $client = (string) $this->getManifest()->attributes()->client;
209                 $this->doLoadLanguage($extension, $source, constant('JPATH_' . strtoupper($client)));
210             }
211         }
212     }
213 
214     /**
215      * Method to parse optional tags in the manifest
216      *
217      * @return  void
218      *
219      * @since   3.4
220      */
221     protected function parseOptionalTags()
222     {
223         // Parse optional tags
224         $this->parent->parseMedia($this->getManifest()->media, $this->clientId);
225         $this->parent->parseLanguages($this->getManifest()->languages, $this->clientId);
226     }
227 
228     /**
229      * Prepares the adapter for a discover_install task
230      *
231      * @return  void
232      *
233      * @since   3.4
234      */
235     public function prepareDiscoverInstall()
236     {
237         $client = JApplicationHelper::getClientInfo($this->parent->extension->client_id);
238         $manifestPath = $client->path . '/modules/' . $this->parent->extension->element . '/' . $this->parent->extension->element . '.xml';
239         $this->parent->manifest = $this->parent->isManifest($manifestPath);
240         $this->parent->setPath('manifest', $manifestPath);
241         $this->setManifest($this->parent->getManifest());
242     }
243 
244     /**
245      * Method to do any prechecks and setup the install paths for the extension
246      *
247      * @return  void
248      *
249      * @since   3.4
250      * @throws  RuntimeException
251      */
252     protected function setupInstallPaths()
253     {
254         // Get the target application
255         $cname = (string) $this->getManifest()->attributes()->client;
256 
257         if ($cname)
258         {
259             // Attempt to map the client to a base path
260             $client = JApplicationHelper::getClientInfo($cname, true);
261 
262             if ($client === false)
263             {
264                 throw new RuntimeException(
265                     JText::sprintf(
266                         'JLIB_INSTALLER_ABORT_MOD_UNKNOWN_CLIENT',
267                         JText::_('JLIB_INSTALLER_' . $this->route),
268                         $client->name
269                     )
270                 );
271             }
272 
273             $basePath = $client->path;
274             $this->clientId = $client->id;
275         }
276         else
277         {
278             // No client attribute was found so we assume the site as the client
279             $basePath = JPATH_SITE;
280             $this->clientId = 0;
281         }
282 
283         // Set the installation path
284         if (empty($this->element))
285         {
286             throw new RuntimeException(
287                 JText::sprintf(
288                     'JLIB_INSTALLER_ABORT_MOD_INSTALL_NOFILE',
289                     JText::_('JLIB_INSTALLER_' . $this->route)
290                 )
291             );
292         }
293 
294         $this->parent->setPath('extension_root', $basePath . '/modules/' . $this->element);
295     }
296 
297     /**
298      * Method to store the extension to the database
299      *
300      * @return  void
301      *
302      * @since   3.4
303      * @throws  RuntimeException
304      */
305     protected function storeExtension()
306     {
307         // Discover installs are stored a little differently
308         if ($this->route === 'discover_install')
309         {
310             $manifest_details = JInstaller::parseXMLInstallFile($this->parent->getPath('manifest'));
311 
312             $this->extension->manifest_cache = json_encode($manifest_details);
313             $this->extension->state = 0;
314             $this->extension->name = $manifest_details['name'];
315             $this->extension->enabled = 1;
316             $this->extension->params = $this->parent->getParams();
317 
318             if (!$this->extension->store())
319             {
320                 // Install failed, roll back changes
321                 throw new RuntimeException(JText::_('JLIB_INSTALLER_ERROR_MOD_DISCOVER_STORE_DETAILS'));
322             }
323 
324             return;
325         }
326 
327         // Was there a module already installed with the same name?
328         if ($this->currentExtensionId)
329         {
330             if (!$this->parent->isOverwrite())
331             {
332                 // Install failed, roll back changes
333                 throw new RuntimeException(
334                     JText::sprintf(
335                         'JLIB_INSTALLER_ABORT_MOD_INSTALL_ALLREADY_EXISTS',
336                         JText::_('JLIB_INSTALLER_' . $this->route),
337                         $this->name
338                     )
339                 );
340             }
341 
342             // Load the entry and update the manifest_cache
343             $this->extension->load($this->currentExtensionId);
344 
345             // Update name
346             $this->extension->name = $this->name;
347 
348             // Update manifest
349             $this->extension->manifest_cache = $this->parent->generateManifestCache();
350 
351             if (!$this->extension->store())
352             {
353                 // Install failed, roll back changes
354                 throw new RuntimeException(
355                     JText::sprintf(
356                         'JLIB_INSTALLER_ABORT_MOD_ROLLBACK',
357                         JText::_('JLIB_INSTALLER_' . $this->route),
358                         $this->extension->getError()
359                     )
360                 );
361             }
362         }
363         else
364         {
365             $this->extension->name    = $this->name;
366             $this->extension->type    = 'module';
367             $this->extension->element = $this->element;
368 
369             // There is no folder for modules
370             $this->extension->folder    = '';
371             $this->extension->enabled   = 1;
372             $this->extension->protected = 0;
373             $this->extension->access    = $this->clientId == 1 ? 2 : 0;
374             $this->extension->client_id = $this->clientId;
375             $this->extension->params    = $this->parent->getParams();
376 
377             // Custom data
378             $this->extension->custom_data    = '';
379             $this->extension->system_data    = '';
380             $this->extension->manifest_cache = $this->parent->generateManifestCache();
381 
382             if (!$this->extension->store())
383             {
384                 // Install failed, roll back changes
385                 throw new RuntimeException(
386                     JText::sprintf(
387                         'JLIB_INSTALLER_ABORT_MOD_ROLLBACK',
388                         JText::_('JLIB_INSTALLER_' . $this->route),
389                         $this->extension->getError()
390                     )
391                 );
392             }
393 
394             // Since we have created a module item, we add it to the installation step stack
395             // so that if we have to rollback the changes we can undo it.
396             $this->parent->pushStep(
397                 array(
398                     'type' => 'extension',
399                     'extension_id' => $this->extension->extension_id,
400                 )
401             );
402 
403             // Create unpublished module
404             $name = preg_replace('#[\*?]#', '', JText::_($this->name));
405 
406             /** @var JTableModule $module */
407             $module            = JTable::getInstance('module');
408             $module->title     = $name;
409             $module->content   = '';
410             $module->module    = $this->element;
411             $module->access    = '1';
412             $module->showtitle = '1';
413             $module->params    = '';
414             $module->client_id = $this->clientId;
415             $module->language  = '*';
416 
417             $module->store();
418         }
419     }
420 
421     /**
422      * Custom discover method
423      *
424      * @return  array  JExtension list of extensions available
425      *
426      * @since   3.1
427      */
428     public function discover()
429     {
430         $results = array();
431         $site_list = JFolder::folders(JPATH_SITE . '/modules');
432         $admin_list = JFolder::folders(JPATH_ADMINISTRATOR . '/modules');
433         $site_info = JApplicationHelper::getClientInfo('site', true);
434         $admin_info = JApplicationHelper::getClientInfo('administrator', true);
435 
436         foreach ($site_list as $module)
437         {
438             if (file_exists(JPATH_SITE . "/modules/$module/$module.xml"))
439             {
440                 $manifest_details = JInstaller::parseXMLInstallFile(JPATH_SITE . "/modules/$module/$module.xml");
441                 $extension = JTable::getInstance('extension');
442                 $extension->set('type', 'module');
443                 $extension->set('client_id', $site_info->id);
444                 $extension->set('element', $module);
445                 $extension->set('folder', '');
446                 $extension->set('name', $module);
447                 $extension->set('state', -1);
448                 $extension->set('manifest_cache', json_encode($manifest_details));
449                 $extension->set('params', '{}');
450                 $results[] = clone $extension;
451             }
452         }
453 
454         foreach ($admin_list as $module)
455         {
456             if (file_exists(JPATH_ADMINISTRATOR . "/modules/$module/$module.xml"))
457             {
458                 $manifest_details = JInstaller::parseXMLInstallFile(JPATH_ADMINISTRATOR . "/modules/$module/$module.xml");
459                 $extension = JTable::getInstance('extension');
460                 $extension->set('type', 'module');
461                 $extension->set('client_id', $admin_info->id);
462                 $extension->set('element', $module);
463                 $extension->set('folder', '');
464                 $extension->set('name', $module);
465                 $extension->set('state', -1);
466                 $extension->set('manifest_cache', json_encode($manifest_details));
467                 $extension->set('params', '{}');
468                 $results[] = clone $extension;
469             }
470         }
471 
472         return $results;
473     }
474 
475     /**
476      * Refreshes the extension table cache
477      *
478      * @return  boolean  Result of operation, true if updated, false on failure.
479      *
480      * @since   3.1
481      */
482     public function refreshManifestCache()
483     {
484         $client = JApplicationHelper::getClientInfo($this->parent->extension->client_id);
485         $manifestPath = $client->path . '/modules/' . $this->parent->extension->element . '/' . $this->parent->extension->element . '.xml';
486         $this->parent->manifest = $this->parent->isManifest($manifestPath);
487         $this->parent->setPath('manifest', $manifestPath);
488         $manifest_details = JInstaller::parseXMLInstallFile($this->parent->getPath('manifest'));
489         $this->parent->extension->manifest_cache = json_encode($manifest_details);
490         $this->parent->extension->name = $manifest_details['name'];
491 
492         if ($this->parent->extension->store())
493         {
494             return true;
495         }
496         else
497         {
498             JLog::add(JText::_('JLIB_INSTALLER_ERROR_MOD_REFRESH_MANIFEST_CACHE'), JLog::WARNING, 'jerror');
499 
500             return false;
501         }
502     }
503 
504     /**
505      * Custom uninstall method
506      *
507      * @param   integer  $id  The id of the module to uninstall
508      *
509      * @return  boolean  True on success
510      *
511      * @since   3.1
512      */
513     public function uninstall($id)
514     {
515         $retval = true;
516         $db     = $this->db;
517 
518         // First order of business will be to load the module object table from the database.
519         // This should give us the necessary information to proceed.
520         if (!$this->extension->load((int) $id) || $this->extension->element === '')
521         {
522             JLog::add(JText::_('JLIB_INSTALLER_ERROR_MOD_UNINSTALL_ERRORUNKOWNEXTENSION'), JLog::WARNING, 'jerror');
523 
524             return false;
525         }
526 
527         // Is the module we are trying to uninstall a core one?
528         // Because that is not a good idea...
529         if ($this->extension->protected)
530         {
531             JLog::add(JText::sprintf('JLIB_INSTALLER_ERROR_MOD_UNINSTALL_WARNCOREMODULE', $this->extension->name), JLog::WARNING, 'jerror');
532 
533             return false;
534         }
535 
536         /*
537          * Does this extension have a parent package?
538          * If so, check if the package disallows individual extensions being uninstalled if the package is not being uninstalled
539          */
540         if ($this->extension->package_id && !$this->parent->isPackageUninstall() && !$this->canUninstallPackageChild($this->extension->package_id))
541         {
542             JLog::add(JText::sprintf('JLIB_INSTALLER_ERROR_CANNOT_UNINSTALL_CHILD_OF_PACKAGE', $this->extension->name), JLog::WARNING, 'jerror');
543 
544             return false;
545         }
546 
547         // Get the extension root path
548         $element = $this->extension->element;
549         $client  = JApplicationHelper::getClientInfo($this->extension->client_id);
550 
551         if ($client === false)
552         {
553             $this->parent->abort(
554                 JText::sprintf(
555                     'JLIB_INSTALLER_ERROR_MOD_UNINSTALL_UNKNOWN_CLIENT',
556                     $this->extension->client_id
557                 )
558             );
559 
560             return false;
561         }
562 
563         $this->parent->setPath('extension_root', $client->path . '/modules/' . $element);
564 
565         $this->parent->setPath('source', $this->parent->getPath('extension_root'));
566 
567         // Get the module's manifest objecct
568         // We do findManifest to avoid problem when uninstalling a list of extensions: getManifest cache its manifest file.
569         $this->parent->findManifest();
570         $this->setManifest($this->parent->getManifest());
571 
572         // Attempt to load the language file; might have uninstall strings
573         $this->loadLanguage(($this->extension->client_id ? JPATH_ADMINISTRATOR : JPATH_SITE) . '/modules/' . $element);
574 
575         // If there is an manifest class file, let's load it
576         $this->scriptElement = $this->getManifest()->scriptfile;
577         $manifestScript      = (string) $this->getManifest()->scriptfile;
578 
579         if ($manifestScript)
580         {
581             $manifestScriptFile = $this->parent->getPath('extension_root') . '/' . $manifestScript;
582 
583             // Set the class name
584             $classname = $element . 'InstallerScript';
585 
586             JLoader::register($classname, $manifestScriptFile);
587 
588             if (class_exists($classname))
589             {
590                 // Create a new instance
591                 $this->parent->manifestClass = new $classname($this);
592 
593                 // And set this so we can copy it later
594                 $this->set('manifest_script', $manifestScript);
595             }
596         }
597 
598         try
599         {
600             $this->triggerManifestScript('uninstall');
601         }
602         catch (RuntimeException $e)
603         {
604             // Ignore errors for now
605         }
606 
607         if (!($this->getManifest() instanceof SimpleXMLElement))
608         {
609             // Make sure we delete the folders
610             JFolder::delete($this->parent->getPath('extension_root'));
611             JLog::add(JText::_('JLIB_INSTALLER_ERROR_MOD_UNINSTALL_INVALID_NOTFOUND_MANIFEST'), JLog::WARNING, 'jerror');
612 
613             return false;
614         }
615 
616         // Let's run the uninstall queries for the module
617         try
618         {
619             $this->parseQueries();
620         }
621         catch (RuntimeException $e)
622         {
623             // Install failed, rollback changes
624             JLog::add($e->getMessage(), JLog::WARNING, 'jerror');
625             $retval = false;
626         }
627 
628         // Remove the schema version
629         $query = $db->getQuery(true)
630             ->delete('#__schemas')
631             ->where('extension_id = ' . $this->extension->extension_id);
632         $db->setQuery($query);
633         $db->execute();
634 
635         // Remove other files
636         $this->parent->removeFiles($this->getManifest()->media);
637         $this->parent->removeFiles($this->getManifest()->languages, $this->extension->client_id);
638 
639         // Let's delete all the module copies for the type we are uninstalling
640         $query->clear()
641             ->select($db->quoteName('id'))
642             ->from($db->quoteName('#__modules'))
643             ->where($db->quoteName('module') . ' = ' . $db->quote($this->extension->element))
644             ->where($db->quoteName('client_id') . ' = ' . (int) $this->extension->client_id);
645         $db->setQuery($query);
646 
647         try
648         {
649             $modules = $db->loadColumn();
650         }
651         catch (RuntimeException $e)
652         {
653             $modules = array();
654         }
655 
656         // Do we have any module copies?
657         if (count($modules))
658         {
659             // Ensure the list is sane
660             $modules = ArrayHelper::toInteger($modules);
661             $modID = implode(',', $modules);
662 
663             // Wipe out any items assigned to menus
664             $query = $db->getQuery(true)
665                 ->delete($db->quoteName('#__modules_menu'))
666                 ->where($db->quoteName('moduleid') . ' IN (' . $modID . ')');
667             $db->setQuery($query);
668 
669             try
670             {
671                 $db->execute();
672             }
673             catch (RuntimeException $e)
674             {
675                 JLog::add(JText::sprintf('JLIB_INSTALLER_ERROR_MOD_UNINSTALL_EXCEPTION', $db->stderr(true)), JLog::WARNING, 'jerror');
676                 $retval = false;
677             }
678 
679             // Wipe out any instances in the modules table
680             /** @var JTableModule $module */
681             $module = JTable::getInstance('Module');
682 
683             foreach ($modules as $modInstanceId)
684             {
685                 $module->load($modInstanceId);
686 
687                 if (!$module->delete())
688                 {
689                     JLog::add(JText::sprintf('JLIB_INSTALLER_ERROR_MOD_UNINSTALL_EXCEPTION', $module->getError()), JLog::WARNING, 'jerror');
690                     $retval = false;
691                 }
692             }
693         }
694 
695         // Now we will no longer need the module object, so let's delete it and free up memory
696         $this->extension->delete($this->extension->extension_id);
697         $query = $db->getQuery(true)
698             ->delete($db->quoteName('#__modules'))
699             ->where($db->quoteName('module') . ' = ' . $db->quote($this->extension->element))
700             ->where($db->quote('client_id') . ' = ' . $this->extension->client_id);
701         $db->setQuery($query);
702 
703         try
704         {
705             // Clean up any other ones that might exist as well
706             $db->execute();
707         }
708         catch (RuntimeException $e)
709         {
710             // Ignore the error...
711         }
712 
713         // Remove the installation folder
714         if (!JFolder::delete($this->parent->getPath('extension_root')))
715         {
716             // JFolder should raise an error
717             $retval = false;
718         }
719 
720         return $retval;
721     }
722 
723     /**
724      * Custom rollback method
725      * - Roll back the menu item
726      *
727      * @param   array  $arg  Installation step to rollback
728      *
729      * @return  boolean  True on success
730      *
731      * @since   3.1
732      */
733     protected function _rollback_menu($arg)
734     {
735         // Get database connector object
736         $db = $this->parent->getDbo();
737 
738         // Remove the entry from the #__modules_menu table
739         $query = $db->getQuery(true)
740             ->delete($db->quoteName('#__modules_menu'))
741             ->where($db->quoteName('moduleid') . ' = ' . (int) $arg['id']);
742         $db->setQuery($query);
743 
744         try
745         {
746             return $db->execute();
747         }
748         catch (RuntimeException $e)
749         {
750             return false;
751         }
752     }
753 
754     /**
755      * Custom rollback method
756      * - Roll back the module item
757      *
758      * @param   array  $arg  Installation step to rollback
759      *
760      * @return  boolean  True on success
761      *
762      * @since   3.1
763      */
764     protected function _rollback_module($arg)
765     {
766         // Get database connector object
767         $db = $this->parent->getDbo();
768 
769         // Remove the entry from the #__modules table
770         $query = $db->getQuery(true)
771             ->delete($db->quoteName('#__modules'))
772             ->where($db->quoteName('id') . ' = ' . (int) $arg['id']);
773         $db->setQuery($query);
774 
775         try
776         {
777             return $db->execute();
778         }
779         catch (RuntimeException $e)
780         {
781             return false;
782         }
783     }
784 }
785 
786 /**
787  * Deprecated class placeholder. You should use JInstallerAdapterModule instead.
788  *
789  * @since       3.1
790  * @deprecated  4.0
791  * @codeCoverageIgnore
792  */
793 class JInstallerModule extends JInstallerAdapterModule
794 {
795 }
796 
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.