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  Router
  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\String\StringHelper;
 13 
 14 /**
 15  * Class to create and parse routes for the site application
 16  *
 17  * @since  1.5
 18  */
 19 class JRouterSite extends JRouter
 20 {
 21     /**
 22      * Component-router objects
 23      *
 24      * @var    array
 25      * @since  3.3
 26      */
 27     protected $componentRouters = array();
 28 
 29     /**
 30      * Current JApplication-Object
 31      *
 32      * @var    JApplicationCms
 33      * @since  3.4
 34      */
 35     protected $app;
 36 
 37     /**
 38      * Current JMenu-Object
 39      *
 40      * @var    JMenu
 41      * @since  3.4
 42      */
 43     protected $menu;
 44 
 45     /**
 46      * Class constructor
 47      *
 48      * @param   array            $options  Array of options
 49      * @param   JApplicationCms  $app      JApplicationCms Object
 50      * @param   JMenu            $menu     JMenu object
 51      *
 52      * @since   3.4
 53      */
 54     public function __construct($options = array(), JApplicationCms $app = null, JMenu $menu = null)
 55     {
 56         parent::__construct($options);
 57 
 58         $this->app  = $app ?: JApplicationCms::getInstance('site');
 59         $this->menu = $menu ?: $this->app->getMenu();
 60     }
 61 
 62     /**
 63      * Function to convert a route to an internal URI
 64      *
 65      * @param   JUri  &$uri  The uri.
 66      *
 67      * @return  array
 68      *
 69      * @since   1.5
 70      */
 71     public function parse(&$uri)
 72     {
 73         $vars = array();
 74 
 75         if ($this->app->get('force_ssl') == 2 && strtolower($uri->getScheme()) !== 'https')
 76         {
 77             // Forward to https
 78             $uri->setScheme('https');
 79             $this->app->redirect((string) $uri, 301);
 80         }
 81 
 82         // Get the path
 83         // Decode URL to convert percent-encoding to unicode so that strings match when routing.
 84         $path = urldecode($uri->getPath());
 85 
 86         // Remove the base URI path.
 87         $path = substr_replace($path, '', 0, strlen(JUri::base(true)));
 88 
 89         // Check to see if a request to a specific entry point has been made.
 90         if (preg_match("#.*?\.php#u", $path, $matches))
 91         {
 92             // Get the current entry point path relative to the site path.
 93             $scriptPath         = realpath($_SERVER['SCRIPT_FILENAME'] ?: str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']));
 94             $relativeScriptPath = str_replace('\\', '/', str_replace(JPATH_SITE, '', $scriptPath));
 95 
 96             // If a php file has been found in the request path, check to see if it is a valid file.
 97             // Also verify that it represents the same file from the server variable for entry script.
 98             if (file_exists(JPATH_SITE . $matches[0]) && ($matches[0] === $relativeScriptPath))
 99             {
100                 // Remove the entry point segments from the request path for proper routing.
101                 $path = str_replace($matches[0], '', $path);
102             }
103         }
104 
105         // Identify format
106         if ($this->_mode == JROUTER_MODE_SEF)
107         {
108             if ($this->app->get('sef_suffix') && !(substr($path, -9) === 'index.php' || substr($path, -1) === '/'))
109             {
110                 if ($suffix = pathinfo($path, PATHINFO_EXTENSION))
111                 {
112                     $vars['format'] = $suffix;
113                 }
114             }
115         }
116 
117         // Set the route
118         $uri->setPath(trim($path, '/'));
119 
120         // Set the parsepreprocess components methods
121         $components = JComponentHelper::getComponents();
122 
123         foreach ($components as $component)
124         {
125             $componentRouter = $this->getComponentRouter($component->option);
126 
127             if (method_exists($componentRouter, 'parsepreprocess'))
128             {
129                 $this->attachParseRule(array($componentRouter, 'parsepreprocess'), static::PROCESS_BEFORE);
130             }
131         }
132 
133         $vars += parent::parse($uri);
134 
135         return $vars;
136     }
137 
138     /**
139      * Function to convert an internal URI to a route
140      *
141      * @param   string  $url  The internal URL
142      *
143      * @return  string  The absolute search engine friendly URL
144      *
145      * @since   1.5
146      */
147     public function build($url)
148     {
149         $uri = parent::build($url);
150 
151         // Get the path data
152         $route = $uri->getPath();
153 
154         // Add the suffix to the uri
155         if ($this->_mode == JROUTER_MODE_SEF && $route)
156         {
157             if ($this->app->get('sef_suffix') && !(substr($route, -9) === 'index.php' || substr($route, -1) === '/'))
158             {
159                 if ($format = $uri->getVar('format', 'html'))
160                 {
161                     $route .= '.' . $format;
162                     $uri->delVar('format');
163                 }
164             }
165 
166             if ($this->app->get('sef_rewrite'))
167             {
168                 // Transform the route
169                 if ($route === 'index.php')
170                 {
171                     $route = '';
172                 }
173                 else
174                 {
175                     $route = str_replace('index.php/', '', $route);
176                 }
177             }
178         }
179 
180         // Add basepath to the uri
181         $uri->setPath(JUri::base(true) . '/' . $route);
182 
183         return $uri;
184     }
185 
186     /**
187      * Function to convert a raw route to an internal URI
188      *
189      * @param   JUri  &$uri  The raw route
190      *
191      * @return  array
192      *
193      * @since   3.2
194      * @deprecated  4.0  Attach your logic as rule to the main parse stage
195      */
196     protected function parseRawRoute(&$uri)
197     {
198         $vars = array();
199 
200         // Handle an empty URL (special case)
201         if (!$uri->getVar('Itemid') && !$uri->getVar('option'))
202         {
203             $item = $this->menu->getDefault($this->app->getLanguage()->getTag());
204 
205             if (!is_object($item))
206             {
207                 // No default item set
208                 return $vars;
209             }
210 
211             // Set the information in the request
212             $vars = $item->query;
213 
214             // Get the itemid
215             $vars['Itemid'] = $item->id;
216 
217             // Set the active menu item
218             $this->menu->setActive($vars['Itemid']);
219 
220             return $vars;
221         }
222 
223         // Get the variables from the uri
224         $this->setVars($uri->getQuery(true));
225 
226         // Get the itemid, if it hasn't been set force it to null
227         $this->setVar('Itemid', $this->app->input->getInt('Itemid', null));
228 
229         // Only an Itemid  OR if filter language plugin set? Get the full information from the itemid
230         if (count($this->getVars()) === 1 || ($this->app->getLanguageFilter() && count($this->getVars()) === 2))
231         {
232             $item = $this->menu->getItem($this->getVar('Itemid'));
233 
234             if ($item && $item->type == 'alias')
235             {
236                 $newItem = $this->menu->getItem($item->params->get('aliasoptions'));
237 
238                 if ($newItem)
239                 {
240                     $item->query     = array_merge($item->query, $newItem->query);
241                     $item->component = $newItem->component;
242                 }
243             }
244 
245             if ($item !== null && is_array($item->query))
246             {
247                 $vars += $item->query;
248             }
249         }
250 
251         // Set the active menu item
252         $this->menu->setActive($this->getVar('Itemid'));
253 
254         return $vars;
255     }
256 
257     /**
258      * Function to convert a sef route to an internal URI
259      *
260      * @param   JUri  &$uri  The sef URI
261      *
262      * @return  string  Internal URI
263      *
264      * @since   3.2
265      * @deprecated  4.0  Attach your logic as rule to the main parse stage
266      */
267     protected function parseSefRoute(&$uri)
268     {
269         $route = $uri->getPath();
270 
271         // Remove the suffix
272         if ($this->app->get('sef_suffix'))
273         {
274             if ($suffix = pathinfo($route, PATHINFO_EXTENSION))
275             {
276                 $route = str_replace('.' . $suffix, '', $route);
277             }
278         }
279 
280         // Get the variables from the uri
281         $vars = $uri->getQuery(true);
282 
283         // Handle an empty URL (special case)
284         if (empty($route))
285         {
286             // If route is empty AND option is set in the query, assume it's non-sef url, and parse apropriately
287             if (isset($vars['option']) || isset($vars['Itemid']))
288             {
289                 return $this->parseRawRoute($uri);
290             }
291 
292             $item = $this->menu->getDefault($this->app->getLanguage()->getTag());
293 
294             // If user not allowed to see default menu item then avoid notices
295             if (is_object($item))
296             {
297                 // Set the information in the request
298                 $vars = $item->query;
299 
300                 // Get the itemid
301                 $vars['Itemid'] = $item->id;
302 
303                 // Set the active menu item
304                 $this->menu->setActive($vars['Itemid']);
305 
306                 $this->setVars($vars);
307             }
308 
309             return $vars;
310         }
311 
312         // Parse the application route
313         $segments = explode('/', $route);
314 
315         if (count($segments) > 1 && $segments[0] === 'component')
316         {
317             $vars['option'] = 'com_' . $segments[1];
318             $vars['Itemid'] = null;
319             $route = implode('/', array_slice($segments, 2));
320         }
321         else
322         {
323             // Get menu items.
324             $items = $this->menu->getMenu();
325 
326             $found           = false;
327             $route_lowercase = StringHelper::strtolower($route);
328             $lang_tag        = $this->app->getLanguage()->getTag();
329 
330             // Iterate through all items and check route matches.
331             foreach ($items as $item)
332             {
333                 if ($item->route && StringHelper::strpos($route_lowercase . '/', $item->route . '/') === 0 && $item->type !== 'menulink')
334                 {
335                     // Usual method for non-multilingual site.
336                     if (!$this->app->getLanguageFilter())
337                     {
338                         // Exact route match. We can break iteration because exact item was found.
339                         if ($item->route === $route_lowercase)
340                         {
341                             $found = $item;
342                             break;
343                         }
344 
345                         // Partial route match. Item with highest level takes priority.
346                         if (!$found || $found->level < $item->level)
347                         {
348                             $found = $item;
349                         }
350                     }
351                     // Multilingual site.
352                     elseif ($item->language === '*' || $item->language === $lang_tag)
353                     {
354                         // Exact route match.
355                         if ($item->route === $route_lowercase)
356                         {
357                             $found = $item;
358 
359                             // Break iteration only if language is matched.
360                             if ($item->language === $lang_tag)
361                             {
362                                 break;
363                             }
364                         }
365 
366                         // Partial route match. Item with highest level or same language takes priority.
367                         if (!$found || $found->level < $item->level || $item->language === $lang_tag)
368                         {
369                             $found = $item;
370                         }
371                     }
372                 }
373             }
374 
375             if (!$found)
376             {
377                 $found = $this->menu->getDefault($lang_tag);
378             }
379             else
380             {
381                 $route = substr($route, strlen($found->route));
382 
383                 if ($route)
384                 {
385                     $route = substr($route, 1);
386                 }
387             }
388 
389             if ($found)
390             {
391                 if ($found->type == 'alias')
392                 {
393                     $newItem = $this->menu->getItem($found->params->get('aliasoptions'));
394 
395                     if ($newItem)
396                     {
397                         $found->query     = array_merge($found->query, $newItem->query);
398                         $found->component = $newItem->component;
399                     }
400                 }
401 
402                 $vars['Itemid'] = $found->id;
403                 $vars['option'] = $found->component;
404             }
405         }
406 
407         // Set the active menu item
408         if (isset($vars['Itemid']))
409         {
410             $this->menu->setActive($vars['Itemid']);
411         }
412 
413         // Set the variables
414         $this->setVars($vars);
415 
416         // Parse the component route
417         if (!empty($route) && isset($this->_vars['option']))
418         {
419             $segments = explode('/', $route);
420 
421             if (empty($segments[0]))
422             {
423                 array_shift($segments);
424             }
425 
426             // Handle component route
427             $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $this->_vars['option']);
428 
429             if (count($segments))
430             {
431                 $crouter = $this->getComponentRouter($component);
432                 $vars = $crouter->parse($segments);
433 
434                 $this->setVars($vars);
435             }
436         }
437         else
438         {
439             // Set active menu item
440             if ($item = $this->menu->getActive())
441             {
442                 $vars = $item->query;
443             }
444         }
445 
446         return $vars;
447     }
448 
449     /**
450      * Function to build a raw route
451      *
452      * @param   JUri  &$uri  The internal URL
453      *
454      * @return  string  Raw Route
455      *
456      * @since   3.2
457      * @deprecated  4.0  Attach your logic as rule to the main build stage
458      */
459     protected function buildRawRoute(&$uri)
460     {
461         // Get the query data
462         $query = $uri->getQuery(true);
463 
464         if (!isset($query['option']))
465         {
466             return;
467         }
468 
469         $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $query['option']);
470         $crouter   = $this->getComponentRouter($component);
471         $query     = $crouter->preprocess($query);
472 
473         $uri->setQuery($query);
474     }
475 
476     /**
477      * Function to build a sef route
478      *
479      * @param   JUri  &$uri  The internal URL
480      *
481      * @return  void
482      *
483      * @since   1.5
484      * @deprecated  4.0  Attach your logic as rule to the main build stage
485      * @codeCoverageIgnore
486      */
487     protected function _buildSefRoute(&$uri)
488     {
489         $this->buildSefRoute($uri);
490     }
491 
492     /**
493      * Function to build a sef route
494      *
495      * @param   JUri  &$uri  The uri
496      *
497      * @return  void
498      *
499      * @since   3.2
500      * @deprecated  4.0  Attach your logic as rule to the main build stage
501      */
502     protected function buildSefRoute(&$uri)
503     {
504         // Get the route
505         $route = $uri->getPath();
506 
507         // Get the query data
508         $query = $uri->getQuery(true);
509 
510         if (!isset($query['option']))
511         {
512             return;
513         }
514 
515         // Build the component route
516         $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $query['option']);
517         $itemID    = !empty($query['Itemid']) ? $query['Itemid'] : null;
518         $crouter   = $this->getComponentRouter($component);
519         $parts     = $crouter->build($query);
520         $result    = implode('/', $parts);
521         $tmp       = ($result !== '') ? $result : '';
522 
523         // Build the application route
524         $built = false;
525 
526         if (!empty($query['Itemid']))
527         {
528             $item = $this->menu->getItem($query['Itemid']);
529 
530             if (is_object($item) && $query['option'] === $item->component)
531             {
532                 if (!$item->home)
533                 {
534                     $tmp = !empty($tmp) ? $item->route . '/' . $tmp : $item->route;
535                 }
536 
537                 $built = true;
538             }
539         }
540 
541         if (empty($query['Itemid']) && !empty($itemID))
542         {
543             $query['Itemid'] = $itemID;
544         }
545 
546         if (!$built)
547         {
548             $tmp = 'component/' . substr($query['option'], 4) . '/' . $tmp;
549         }
550 
551         if ($tmp)
552         {
553             $route .= '/' . $tmp;
554         }
555 
556         // Unset unneeded query information
557         if (isset($item) && $query['option'] === $item->component)
558         {
559             unset($query['Itemid']);
560         }
561 
562         unset($query['option']);
563 
564         // Set query again in the URI
565         $uri->setQuery($query);
566         $uri->setPath($route);
567     }
568 
569     /**
570      * Process the parsed router variables based on custom defined rules
571      *
572      * @param   JUri    &$uri   The URI to parse
573      * @param   string  $stage  The stage that should be processed.
574      *                          Possible values: 'preprocess', 'postprocess'
575      *                          and '' for the main parse stage
576      *
577      * @return  array  The array of processed URI variables
578      *
579      * @since   3.2
580      */
581     protected function processParseRules(&$uri, $stage = self::PROCESS_DURING)
582     {
583         // Process the attached parse rules
584         $vars = parent::processParseRules($uri, $stage);
585 
586         if ($stage === self::PROCESS_DURING)
587         {
588             // Process the pagination support
589             if ($this->_mode == JROUTER_MODE_SEF)
590             {
591                 if ($start = $uri->getVar('start'))
592                 {
593                     $uri->delVar('start');
594                     $vars['limitstart'] = $start;
595                 }
596             }
597         }
598 
599         return $vars;
600     }
601 
602     /**
603      * Process the build uri query data based on custom defined rules
604      *
605      * @param   JUri    &$uri   The URI
606      * @param   string  $stage  The stage that should be processed.
607      *                          Possible values: 'preprocess', 'postprocess'
608      *                          and '' for the main build stage
609      *
610      * @return  void
611      *
612      * @since   3.2
613      * @deprecated  4.0  The special logic should be implemented as rule
614      */
615     protected function processBuildRules(&$uri, $stage = self::PROCESS_DURING)
616     {
617         if ($stage === self::PROCESS_DURING)
618         {
619             // Make sure any menu vars are used if no others are specified
620             $query = $uri->getQuery(true);
621             if ($this->_mode != 1
622                 && isset($query['Itemid'])
623                 && (count($query) === 2 || (count($query) === 3 && isset($query['lang']))))
624             {
625                 // Get the active menu item
626                 $itemid = $uri->getVar('Itemid');
627                 $lang = $uri->getVar('lang');
628                 $item = $this->menu->getItem($itemid);
629 
630                 if ($item)
631                 {
632                     $uri->setQuery($item->query);
633                 }
634 
635                 $uri->setVar('Itemid', $itemid);
636 
637                 if ($lang)
638                 {
639                     $uri->setVar('lang', $lang);
640                 }
641             }
642         }
643 
644         // Process the attached build rules
645         parent::processBuildRules($uri, $stage);
646 
647         if ($stage === self::PROCESS_BEFORE)
648         {
649             // Get the query data
650             $query = $uri->getQuery(true);
651 
652             if (!isset($query['option']))
653             {
654                 return;
655             }
656 
657             // Build the component route
658             $component = preg_replace('/[^A-Z0-9_\.-]/i', '', $query['option']);
659             $router   = $this->getComponentRouter($component);
660             $query     = $router->preprocess($query);
661             $uri->setQuery($query);
662         }
663 
664         if ($stage === self::PROCESS_DURING)
665         {
666             // Get the path data
667             $route = $uri->getPath();
668 
669             if ($this->_mode == JROUTER_MODE_SEF && $route)
670             {
671                 if ($limitstart = $uri->getVar('limitstart'))
672                 {
673                     $uri->setVar('start', (int) $limitstart);
674                     $uri->delVar('limitstart');
675                 }
676             }
677 
678             $uri->setPath($route);
679         }
680     }
681 
682     /**
683      * Create a uri based on a full or partial URL string
684      *
685      * @param   string  $url  The URI
686      *
687      * @return  JUri
688      *
689      * @since   3.2
690      */
691     protected function createUri($url)
692     {
693         // Create the URI
694         $uri = parent::createUri($url);
695 
696         // Get the itemid form the URI
697         $itemid = $uri->getVar('Itemid');
698 
699         if ($itemid === null)
700         {
701             if ($option = $uri->getVar('option'))
702             {
703                 $item = $this->menu->getItem($this->getVar('Itemid'));
704 
705                 if (isset($item) && $item->component === $option)
706                 {
707                     $uri->setVar('Itemid', $item->id);
708                 }
709             }
710             else
711             {
712                 if ($option = $this->getVar('option'))
713                 {
714                     $uri->setVar('option', $option);
715                 }
716 
717                 if ($itemid = $this->getVar('Itemid'))
718                 {
719                     $uri->setVar('Itemid', $itemid);
720                 }
721             }
722         }
723         else
724         {
725             if (!$uri->getVar('option'))
726             {
727                 if ($item = $this->menu->getItem($itemid))
728                 {
729                     $uri->setVar('option', $item->component);
730                 }
731             }
732         }
733 
734         return $uri;
735     }
736 
737     /**
738      * Get component router
739      *
740      * @param   string  $component  Name of the component including com_ prefix
741      *
742      * @return  JComponentRouterInterface  Component router
743      *
744      * @since   3.3
745      */
746     public function getComponentRouter($component)
747     {
748         if (!isset($this->componentRouters[$component]))
749         {
750             $compname = ucfirst(substr($component, 4));
751             $class = $compname . 'Router';
752 
753             if (!class_exists($class))
754             {
755                 // Use the component routing handler if it exists
756                 $path = JPATH_SITE . '/components/' . $component . '/router.php';
757 
758                 // Use the custom routing handler if it exists
759                 if (file_exists($path))
760                 {
761                     require_once $path;
762                 }
763             }
764 
765             if (class_exists($class))
766             {
767                 $reflection = new ReflectionClass($class);
768 
769                 if (in_array('JComponentRouterInterface', $reflection->getInterfaceNames()))
770                 {
771                     $this->componentRouters[$component] = new $class($this->app, $this->menu);
772                 }
773             }
774 
775             if (!isset($this->componentRouters[$component]))
776             {
777                 $this->componentRouters[$component] = new JComponentRouterLegacy($compname);
778             }
779         }
780 
781         return $this->componentRouters[$component];
782     }
783 
784     /**
785      * Set a router for a component
786      *
787      * @param   string  $component  Component name with com_ prefix
788      * @param   object  $router     Component router
789      *
790      * @return  boolean  True if the router was accepted, false if not
791      *
792      * @since   3.3
793      */
794     public function setComponentRouter($component, $router)
795     {
796         $reflection = new ReflectionClass($router);
797 
798         if (in_array('JComponentRouterInterface', $reflection->getInterfaceNames()))
799         {
800             $this->componentRouters[$component] = $router;
801 
802             return true;
803         }
804         else
805         {
806             return false;
807         }
808     }
809 }
810 
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.