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.Platform
  4  * @subpackage  Document
  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
  8  */
  9 
 10 defined('JPATH_PLATFORM') or die;
 11 
 12 use Joomla\Registry\Registry;
 13 
 14 jimport('joomla.utilities.utility');
 15 
 16 /**
 17  * JDocumentHtml class, provides an easy interface to parse and display a HTML document
 18  *
 19  * @since  11.1
 20  */
 21 class JDocumentHtml extends JDocument
 22 {
 23     /**
 24      * Array of Header `<link>` tags
 25      *
 26      * @var    array
 27      * @since  11.1
 28      */
 29     public $_links = array();
 30 
 31     /**
 32      * Array of custom tags
 33      *
 34      * @var    array
 35      * @since  11.1
 36      */
 37     public $_custom = array();
 38 
 39     /**
 40      * Name of the template
 41      *
 42      * @var    string
 43      * @since  11.1
 44      */
 45     public $template = null;
 46 
 47     /**
 48      * Base url
 49      *
 50      * @var    string
 51      * @since  11.1
 52      */
 53     public $baseurl = null;
 54 
 55     /**
 56      * Array of template parameters
 57      *
 58      * @var    array
 59      * @since  11.1
 60      */
 61     public $params = null;
 62 
 63     /**
 64      * File name
 65      *
 66      * @var    array
 67      * @since  11.1
 68      */
 69     public $_file = null;
 70 
 71     /**
 72      * String holding parsed template
 73      *
 74      * @var    string
 75      * @since  11.1
 76      */
 77     protected $_template = '';
 78 
 79     /**
 80      * Array of parsed template JDoc tags
 81      *
 82      * @var    array
 83      * @since  11.1
 84      */
 85     protected $_template_tags = array();
 86 
 87     /**
 88      * Integer with caching setting
 89      *
 90      * @var    integer
 91      * @since  11.1
 92      */
 93     protected $_caching = null;
 94 
 95     /**
 96      * Set to true when the document should be output as HTML5
 97      *
 98      * @var    boolean
 99      * @since  12.1
100      *
101      * @note  4.0  Will be replaced by $html5 and the default value will be true.
102      */
103     private $_html5 = null;
104 
105     /**
106      * Class constructor
107      *
108      * @param   array  $options  Associative array of options
109      *
110      * @since   11.1
111      */
112     public function __construct($options = array())
113     {
114         parent::__construct($options);
115 
116         // Set document type
117         $this->_type = 'html';
118 
119         // Set default mime type and document metadata (meta data syncs with mime type by default)
120         $this->setMimeEncoding('text/html');
121     }
122 
123     /**
124      * Get the HTML document head data
125      *
126      * @return  array  The document head data in array form
127      *
128      * @since   11.1
129      */
130     public function getHeadData()
131     {
132         $data = array();
133         $data['title']       = $this->title;
134         $data['description'] = $this->description;
135         $data['link']        = $this->link;
136         $data['metaTags']    = $this->_metaTags;
137         $data['links']       = $this->_links;
138         $data['styleSheets'] = $this->_styleSheets;
139         $data['style']       = $this->_style;
140         $data['scripts']     = $this->_scripts;
141         $data['script']      = $this->_script;
142         $data['custom']      = $this->_custom;
143         $data['scriptText']  = JText::script();
144 
145         return $data;
146     }
147 
148     /**
149      * Reset the HTML document head data
150      *
151      * @param   mixed  $types  type or types of the heads elements to reset
152      *
153      * @return  JDocumentHTML  instance of $this to allow chaining
154      *
155      * @since   3.7.0
156      */
157     public function resetHeadData($types = null)
158     {
159         if (is_null($types))
160         {
161             $this->title        = '';
162             $this->description  = '';
163             $this->link         = '';
164             $this->_metaTags    = array();
165             $this->_links       = array();
166             $this->_styleSheets = array();
167             $this->_style       = array();
168             $this->_scripts     = array();
169             $this->_script      = array();
170             $this->_custom      = array();
171         }
172 
173         if (is_array($types))
174         {
175             foreach ($types as $type)
176             {
177                 $this->resetHeadDatum($type);
178             }
179         }
180 
181         if (is_string($types))
182         {
183             $this->resetHeadDatum($types);
184         }
185 
186         return $this;
187     }
188 
189     /**
190      * Reset a part the HTML document head data
191      *
192      * @param   string  $type  type of the heads elements to reset
193      *
194      * @return  void
195      *
196      * @since   3.7.0
197      */
198     private function resetHeadDatum($type)
199     {
200         switch ($type)
201         {
202             case 'title':
203             case 'description':
204             case 'link':
205                 $this->{$type} = '';
206                 break;
207 
208             case 'metaTags':
209             case 'links':
210             case 'styleSheets':
211             case 'style':
212             case 'scripts':
213             case 'script':
214             case 'custom':
215                 $realType = '_' . $type;
216                 $this->{$realType} = array();
217                 break;
218         }
219     }
220 
221     /**
222      * Set the HTML document head data
223      *
224      * @param   array  $data  The document head data in array form
225      *
226      * @return  JDocumentHTML|null instance of $this to allow chaining or null for empty input data
227      *
228      * @since   11.1
229      */
230     public function setHeadData($data)
231     {
232         if (empty($data) || !is_array($data))
233         {
234             return;
235         }
236 
237         $this->title        = (isset($data['title']) && !empty($data['title'])) ? $data['title'] : $this->title;
238         $this->description  = (isset($data['description']) && !empty($data['description'])) ? $data['description'] : $this->description;
239         $this->link         = (isset($data['link']) && !empty($data['link'])) ? $data['link'] : $this->link;
240         $this->_metaTags    = (isset($data['metaTags']) && !empty($data['metaTags'])) ? $data['metaTags'] : $this->_metaTags;
241         $this->_links       = (isset($data['links']) && !empty($data['links'])) ? $data['links'] : $this->_links;
242         $this->_styleSheets = (isset($data['styleSheets']) && !empty($data['styleSheets'])) ? $data['styleSheets'] : $this->_styleSheets;
243         $this->_style       = (isset($data['style']) && !empty($data['style'])) ? $data['style'] : $this->_style;
244         $this->_scripts     = (isset($data['scripts']) && !empty($data['scripts'])) ? $data['scripts'] : $this->_scripts;
245         $this->_script      = (isset($data['script']) && !empty($data['script'])) ? $data['script'] : $this->_script;
246         $this->_custom      = (isset($data['custom']) && !empty($data['custom'])) ? $data['custom'] : $this->_custom;
247 
248         if (isset($data['scriptText']) && !empty($data['scriptText']))
249         {
250             foreach ($data['scriptText'] as $key => $string)
251             {
252                 JText::script($key, $string);
253             }
254         }
255 
256         return $this;
257     }
258 
259     /**
260      * Merge the HTML document head data
261      *
262      * @param   array  $data  The document head data in array form
263      *
264      * @return  JDocumentHTML|null instance of $this to allow chaining or null for empty input data
265      *
266      * @since   11.1
267      */
268     public function mergeHeadData($data)
269     {
270         if (empty($data) || !is_array($data))
271         {
272             return;
273         }
274 
275         $this->title = (isset($data['title']) && !empty($data['title']) && !stristr($this->title, $data['title']))
276             ? $this->title . $data['title']
277             : $this->title;
278         $this->description = (isset($data['description']) && !empty($data['description']) && !stristr($this->description, $data['description']))
279             ? $this->description . $data['description']
280             : $this->description;
281         $this->link = (isset($data['link'])) ? $data['link'] : $this->link;
282 
283         if (isset($data['metaTags']))
284         {
285             foreach ($data['metaTags'] as $type1 => $data1)
286             {
287                 $booldog = $type1 == 'http-equiv' ? true : false;
288 
289                 foreach ($data1 as $name2 => $data2)
290                 {
291                     $this->setMetaData($name2, $data2, $booldog);
292                 }
293             }
294         }
295 
296         $this->_links = (isset($data['links']) && !empty($data['links']) && is_array($data['links']))
297             ? array_unique(array_merge($this->_links, $data['links']), SORT_REGULAR)
298             : $this->_links;
299         $this->_styleSheets = (isset($data['styleSheets']) && !empty($data['styleSheets']) && is_array($data['styleSheets']))
300             ? array_merge($this->_styleSheets, $data['styleSheets'])
301             : $this->_styleSheets;
302 
303         if (isset($data['style']))
304         {
305             foreach ($data['style'] as $type => $stdata)
306             {
307                 if (!isset($this->_style[strtolower($type)]) || !stristr($this->_style[strtolower($type)], $stdata))
308                 {
309                     $this->addStyleDeclaration($stdata, $type);
310                 }
311             }
312         }
313 
314         $this->_scripts = (isset($data['scripts']) && !empty($data['scripts']) && is_array($data['scripts']))
315             ? array_merge($this->_scripts, $data['scripts'])
316             : $this->_scripts;
317 
318         if (isset($data['script']))
319         {
320             foreach ($data['script'] as $type => $sdata)
321             {
322                 if (!isset($this->_script[strtolower($type)]) || !stristr($this->_script[strtolower($type)], $sdata))
323                 {
324                     $this->addScriptDeclaration($sdata, $type);
325                 }
326             }
327         }
328 
329         $this->_custom = (isset($data['custom']) && !empty($data['custom']) && is_array($data['custom']))
330             ? array_unique(array_merge($this->_custom, $data['custom']))
331             : $this->_custom;
332 
333         return $this;
334     }
335 
336     /**
337      * Adds `<link>` tags to the head of the document
338      *
339      * $relType defaults to 'rel' as it is the most common relation type used.
340      * ('rev' refers to reverse relation, 'rel' indicates normal, forward relation.)
341      * Typical tag: `<link href="index.php" rel="Start">`
342      *
343      * @param   string  $href      The link that is being related.
344      * @param   string  $relation  Relation of link.
345      * @param   string  $relType   Relation type attribute.  Either rel or rev (default: 'rel').
346      * @param   array   $attribs   Associative array of remaining attributes.
347      *
348      * @return  JDocumentHTML instance of $this to allow chaining
349      *
350      * @since   11.1
351      */
352     public function addHeadLink($href, $relation, $relType = 'rel', $attribs = array())
353     {
354         $this->_links[$href]['relation'] = $relation;
355         $this->_links[$href]['relType'] = $relType;
356         $this->_links[$href]['attribs'] = $attribs;
357 
358         return $this;
359     }
360 
361     /**
362      * Adds a shortcut icon (favicon)
363      *
364      * This adds a link to the icon shown in the favorites list or on
365      * the left of the url in the address bar. Some browsers display
366      * it on the tab, as well.
367      *
368      * @param   string  $href      The link that is being related.
369      * @param   string  $type      File type
370      * @param   string  $relation  Relation of link
371      *
372      * @return  JDocumentHTML instance of $this to allow chaining
373      *
374      * @since   11.1
375      */
376     public function addFavicon($href, $type = 'image/vnd.microsoft.icon', $relation = 'shortcut icon')
377     {
378         $href = str_replace('\\', '/', $href);
379         $this->addHeadLink($href, $relation, 'rel', array('type' => $type));
380 
381         return $this;
382     }
383 
384     /**
385      * Adds a custom HTML string to the head block
386      *
387      * @param   string  $html  The HTML to add to the head
388      *
389      * @return  JDocumentHTML instance of $this to allow chaining
390      *
391      * @since   11.1
392      */
393     public function addCustomTag($html)
394     {
395         $this->_custom[] = trim($html);
396 
397         return $this;
398     }
399 
400     /**
401      * Returns whether the document is set up to be output as HTML5
402      *
403      * @return  boolean true when HTML5 is used
404      *
405      * @since   12.1
406      */
407     public function isHtml5()
408     {
409         return $this->_html5;
410     }
411 
412     /**
413      * Sets whether the document should be output as HTML5
414      *
415      * @param   bool  $state  True when HTML5 should be output
416      *
417      * @return  void
418      *
419      * @since   12.1
420      */
421     public function setHtml5($state)
422     {
423         if (is_bool($state))
424         {
425             $this->_html5 = $state;
426         }
427     }
428 
429     /**
430      * Get the contents of a document include
431      *
432      * @param   string  $type     The type of renderer
433      * @param   string  $name     The name of the element to render
434      * @param   array   $attribs  Associative array of remaining attributes.
435      *
436      * @return  mixed|string The output of the renderer
437      *
438      * @since   11.1
439      */
440     public function getBuffer($type = null, $name = null, $attribs = array())
441     {
442         // If no type is specified, return the whole buffer
443         if ($type === null)
444         {
445             return parent::$_buffer;
446         }
447 
448         $title = (isset($attribs['title'])) ? $attribs['title'] : null;
449 
450         if (isset(parent::$_buffer[$type][$name][$title]))
451         {
452             return parent::$_buffer[$type][$name][$title];
453         }
454 
455         $renderer = $this->loadRenderer($type);
456 
457         if ($this->_caching == true && $type == 'modules')
458         {
459             $cache = JFactory::getCache('com_modules', '');
460             $hash = md5(serialize(array($name, $attribs, null, $renderer)));
461             $cbuffer = $cache->get('cbuffer_' . $type);
462 
463             if (isset($cbuffer[$hash]))
464             {
465                 return JCache::getWorkarounds($cbuffer[$hash], array('mergehead' => 1));
466             }
467             else
468             {
469                 $options = array();
470                 $options['nopathway'] = 1;
471                 $options['nomodules'] = 1;
472                 $options['modulemode'] = 1;
473 
474                 $this->setBuffer($renderer->render($name, $attribs, null), $type, $name);
475                 $data = parent::$_buffer[$type][$name][$title];
476 
477                 $tmpdata = JCache::setWorkarounds($data, $options);
478 
479                 $cbuffer[$hash] = $tmpdata;
480 
481                 $cache->store($cbuffer, 'cbuffer_' . $type);
482             }
483         }
484         else
485         {
486             $this->setBuffer($renderer->render($name, $attribs, null), $type, $name, $title);
487         }
488 
489         return parent::$_buffer[$type][$name][$title];
490     }
491 
492     /**
493      * Set the contents a document includes
494      *
495      * @param   string  $content  The content to be set in the buffer.
496      * @param   array   $options  Array of optional elements.
497      *
498      * @return  JDocumentHTML instance of $this to allow chaining
499      *
500      * @since   11.1
501      */
502     public function setBuffer($content, $options = array())
503     {
504         // The following code is just for backward compatibility.
505         if (func_num_args() > 1 && !is_array($options))
506         {
507             $args = func_get_args();
508             $options = array();
509             $options['type'] = $args[1];
510             $options['name'] = (isset($args[2])) ? $args[2] : null;
511             $options['title'] = (isset($args[3])) ? $args[3] : null;
512         }
513 
514         parent::$_buffer[$options['type']][$options['name']][$options['title']] = $content;
515 
516         return $this;
517     }
518 
519     /**
520      * Parses the template and populates the buffer
521      *
522      * @param   array  $params  Parameters for fetching the template
523      *
524      * @return  JDocumentHTML instance of $this to allow chaining
525      *
526      * @since   11.1
527      */
528     public function parse($params = array())
529     {
530         return $this->_fetchTemplate($params)->_parseTemplate();
531     }
532 
533     /**
534      * Outputs the template to the browser.
535      *
536      * @param   boolean  $caching  If true, cache the output
537      * @param   array    $params   Associative array of attributes
538      *
539      * @return  string The rendered data
540      *
541      * @since   11.1
542      */
543     public function render($caching = false, $params = array())
544     {
545         $this->_caching = $caching;
546 
547         if (empty($this->_template))
548         {
549             $this->parse($params);
550         }
551 
552         $data = $this->_renderTemplate();
553         parent::render();
554 
555         return $data;
556     }
557 
558     /**
559      * Count the modules based on the given condition
560      *
561      * @param   string  $condition  The condition to use
562      *
563      * @return  integer  Number of modules found
564      *
565      * @since   11.1
566      */
567     public function countModules($condition)
568     {
569         $operators = '(\+|\-|\*|\/|==|\!=|\<\>|\<|\>|\<=|\>=|and|or|xor)';
570         $words = preg_split('# ' . $operators . ' #', $condition, null, PREG_SPLIT_DELIM_CAPTURE);
571 
572         if (count($words) === 1)
573         {
574             $name = strtolower($words[0]);
575             $result = ((isset(parent::$_buffer['modules'][$name])) && (parent::$_buffer['modules'][$name] === false))
576                 ? 0 : count(JModuleHelper::getModules($name));
577 
578             return $result;
579         }
580 
581         JLog::add('Using an expression in JDocumentHtml::countModules() is deprecated.', JLog::WARNING, 'deprecated');
582 
583         for ($i = 0, $n = count($words); $i < $n; $i += 2)
584         {
585             // Odd parts (modules)
586             $name = strtolower($words[$i]);
587             $words[$i] = ((isset(parent::$_buffer['modules'][$name])) && (parent::$_buffer['modules'][$name] === false))
588                 ? 0
589                 : count(JModuleHelper::getModules($name));
590         }
591 
592         $str = 'return ' . implode(' ', $words) . ';';
593 
594         return eval($str);
595     }
596 
597     /**
598      * Count the number of child menu items of the current active menu item
599      *
600      * @return  integer  Number of child menu items
601      *
602      * @since   11.1
603      */
604     public function countMenuChildren()
605     {
606         static $children;
607 
608         if (!isset($children))
609         {
610             $db = JFactory::getDbo();
611             $app = JFactory::getApplication();
612             $menu = $app->getMenu();
613             $active = $menu->getActive();
614             $children = 0;
615 
616             if ($active)
617             {
618                 $query = $db->getQuery(true)
619                     ->select('COUNT(*)')
620                     ->from('#__menu')
621                     ->where('parent_id = ' . $active->id)
622                     ->where('published = 1');
623                 $db->setQuery($query);
624                 $children = $db->loadResult();
625             }
626         }
627 
628         return $children;
629     }
630 
631     /**
632      * Load a template file
633      *
634      * @param   string  $directory  The name of the template
635      * @param   string  $filename   The actual filename
636      *
637      * @return  string  The contents of the template
638      *
639      * @since   11.1
640      */
641     protected function _loadTemplate($directory, $filename)
642     {
643         $contents = '';
644 
645         // Check to see if we have a valid template file
646         if (file_exists($directory . '/' . $filename))
647         {
648             // Store the file path
649             $this->_file = $directory . '/' . $filename;
650 
651             // Get the file content
652             ob_start();
653             require $directory . '/' . $filename;
654             $contents = ob_get_contents();
655             ob_end_clean();
656         }
657 
658         // Try to find a favicon by checking the template and root folder
659         $icon = '/favicon.ico';
660 
661         foreach (array($directory, JPATH_BASE) as $dir)
662         {
663             if (file_exists($dir . $icon))
664             {
665                 $path = str_replace(JPATH_BASE, '', $dir);
666                 $path = str_replace('\\', '/', $path);
667                 $this->addFavicon(JUri::base(true) . $path . $icon);
668                 break;
669             }
670         }
671 
672         return $contents;
673     }
674 
675     /**
676      * Fetch the template, and initialise the params
677      *
678      * @param   array  $params  Parameters to determine the template
679      *
680      * @return  JDocumentHTML instance of $this to allow chaining
681      *
682      * @since   11.1
683      */
684     protected function _fetchTemplate($params = array())
685     {
686         // Check
687         $directory = isset($params['directory']) ? $params['directory'] : 'templates';
688         $filter = JFilterInput::getInstance();
689         $template = $filter->clean($params['template'], 'cmd');
690         $file = $filter->clean($params['file'], 'cmd');
691 
692         if (!file_exists($directory . '/' . $template . '/' . $file))
693         {
694             $template = 'system';
695         }
696 
697         if (!file_exists($directory . '/' . $template . '/' . $file))
698         {
699             $file = 'index.php';
700         }
701 
702         // Load the language file for the template
703         $lang = JFactory::getLanguage();
704 
705         // 1.5 or core then 1.6
706         $lang->load('tpl_' . $template, JPATH_BASE, null, false, true)
707             || $lang->load('tpl_' . $template, $directory . '/' . $template, null, false, true);
708 
709         // Assign the variables
710         $this->template = $template;
711         $this->baseurl = JUri::base(true);
712         $this->params = isset($params['params']) ? $params['params'] : new Registry;
713 
714         // Load
715         $this->_template = $this->_loadTemplate($directory . '/' . $template, $file);
716 
717         return $this;
718     }
719 
720     /**
721      * Parse a document template
722      *
723      * @return  JDocumentHTML  instance of $this to allow chaining
724      *
725      * @since   11.1
726      */
727     protected function _parseTemplate()
728     {
729         $matches = array();
730 
731         if (preg_match_all('#<jdoc:include\ type="([^"]+)"(.*)\/>#iU', $this->_template, $matches))
732         {
733             $template_tags_first = array();
734             $template_tags_last = array();
735 
736             // Step through the jdocs in reverse order.
737             for ($i = count($matches[0]) - 1; $i >= 0; $i--)
738             {
739                 $type = $matches[1][$i];
740                 $attribs = empty($matches[2][$i]) ? array() : JUtility::parseAttributes($matches[2][$i]);
741                 $name = isset($attribs['name']) ? $attribs['name'] : null;
742 
743                 // Separate buffers to be executed first and last
744                 if ($type == 'module' || $type == 'modules')
745                 {
746                     $template_tags_first[$matches[0][$i]] = array('type' => $type, 'name' => $name, 'attribs' => $attribs);
747                 }
748                 else
749                 {
750                     $template_tags_last[$matches[0][$i]] = array('type' => $type, 'name' => $name, 'attribs' => $attribs);
751                 }
752             }
753             // Reverse the last array so the jdocs are in forward order.
754             $template_tags_last = array_reverse($template_tags_last);
755 
756             $this->_template_tags = $template_tags_first + $template_tags_last;
757         }
758 
759         return $this;
760     }
761 
762     /**
763      * Render pre-parsed template
764      *
765      * @return string rendered template
766      *
767      * @since   11.1
768      */
769     protected function _renderTemplate()
770     {
771         $replace = array();
772         $with = array();
773 
774         foreach ($this->_template_tags as $jdoc => $args)
775         {
776             $replace[] = $jdoc;
777             $with[] = $this->getBuffer($args['type'], $args['name'], $args['attribs']);
778         }
779 
780         return str_replace($replace, $with, $this->_template);
781     }
782 }
783 
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.