Methods summary
public static
Xoops
|
#
getInstance( )
Access the only instance of this class
Access the only instance of this class
Returns
|
public
Xoops\Core\Database\Connection
|
#
db( )
get database connection instance
get database connection instance
Returns
|
public
Xoops\Core\Cache\Access
|
#
cache( string $cacheName = 'default' )
get a \Xoops\Core\Cache\Access object for a named cache
get a \Xoops\Core\Cache\Access object for a named cache
Parameters
- $cacheName
- a named cached pool
Returns
|
public
Xoops\Core\Logger
|
#
logger( )
get the system logger instance
get the system logger instance
Returns
|
public
Xoops\Core\Events
|
#
events( )
get the event processor
Returns
|
public
Xoops\Core\Assets
|
#
assets( )
get the asset utility
Returns
|
public
Xoops\Core\Service\Provider
|
#
service( string $service )
get the service manager
Parameters
Returns
|
public
Xoops\Core\Registry
|
#
registry( )
provide a common registry instance
provide a common registry instance
Returns
|
public
XoopsSecurity
|
|
public
null|XoopsTpl
|
#
tpl( )
get current template engine
get current template engine
Returns
|
public
XoopsTpl
|
|
public
null|XoopsTheme
|
#
theme( null|string $tpl_name = null )
establish the theme
Parameters
Returns
|
public
XoopsTheme
|
|
public
string
|
#
path( string $url, boolean $virtual = false )
Convert a XOOPS path to a physical one
Convert a XOOPS path to a physical one
Parameters
- $url
- url to derive path from
- $virtual
- virtual
Returns
string
|
public
string
|
#
normalizePath( string $path )
Convert path separators to unix style
Convert path separators to unix style
Parameters
Returns
string normalized path
|
public
string
|
#
url( string $url )
Convert a XOOPS path to an URL
Convert a XOOPS path to an URL
Parameters
Returns
string
|
public
string
|
#
buildUrl( string $url, array $params = array() )
Build an URL with the specified request params
Build an URL with the specified request params
Parameters
- $url
- base url
- $params
- parameters to add to the url
Returns
string
|
public
string|false
|
#
pathExists( string $path, string $error_type )
Check if a path exists
Parameters
- $path
- filesystem path
- $error_type
- error level i.e. Psr\Log\LogLevel
Returns
string|false
|
public
|
#
gzipCompression( )
Start gzipCompression output buffer
Start gzipCompression output buffer
|
public
|
|
public
|
|
public
array|false
|
#
getTplInfo( string $tpl_name )
Gets module, type and file from a tpl name
Gets module, type and file from a tpl name
Parameters
- $tpl_name
- in form type:module/filename.tpl
Returns
array|false associative array of 'tpl_name', 'type', 'module', 'file'
or false on error
|
public
boolean
|
#
isModule( )
Check if a module is set
Returns
boolean
|
public
boolean
|
#
isUser( )
Check if a user is set
Returns
boolean
|
public
boolean
|
#
isAdmin( )
Check if user is admin
Returns
boolean
|
public
Xoops\Core\Kernel\Handlers\XoopsBlockHandler
|
#
getHandlerBlock( boolean $optional = false )
Get handler of Block
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsBlockModuleLinkHandler
|
#
getHandlerBlockModuleLink( boolean $optional = false )
Get handler of Block Module Link
Get handler of Block Module Link
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsConfigHandler
|
#
getHandlerConfig( boolean $optional = false )
Get handler of Config
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsConfigItemHandler
|
#
getHandlerConfigItem( boolean $optional = false )
Get handler of Config Item
Get handler of Config Item
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsConfigOptionHandler
|
#
getHandlerConfigOption( boolean $optional = false )
Get handler of Config Option
Get handler of Config Option
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsGroupHandler
|
#
getHandlerGroup( boolean $optional = false )
Get handler of Group
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsGroupPermHandler
|
#
getHandlerGroupPermission( boolean $optional = false )
Get handler of Group Permission
Get handler of Group Permission
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsMemberHandler
|
#
getHandlerMember( boolean $optional = false )
Get handler of Member
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsMembershipHandler
|
#
getHandlerMembership( boolean $optional = false )
Get handler of Membership
Get handler of Membership
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsModuleHandler
|
#
getHandlerModule( boolean $optional = false )
Get handler of Module
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsOnlineHandler
|
#
getHandlerOnline( boolean $optional = false )
Get handler of Online
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsPrivateMessageHandler
|
#
getHandlerPrivateMessage( boolean $optional = false )
Get handler of Private Message
Get handler of Private Message
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Session\Manager
|
#
session( )
Get the session manager
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsTplFileHandler
|
#
getHandlerTplFile( boolean $optional = false )
Get handler of Template File
Get handler of Template File
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsTplSetHandler
|
#
getHandlerTplSet( boolean $optional = false )
Get handler of Template Set
Get handler of Template Set
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Core\Kernel\Handlers\XoopsUserHandler
|
#
getHandlerUser( boolean $optional = false )
Get handler of User
Parameters
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
protected
XoopsObjectHandler |XoopsPersistableObjectHandler |null
|
#
getHandler( string $name, boolean $optional = false )
Get handler
Parameters
- $name
- name of handler
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
XoopsObjectHandler |XoopsPersistableObjectHandler |boolean
|
#
getModuleHandler( string|null $name = null, string|null $module_dir = null, boolean $optional = false )
Get Module Handler
Parameters
- $name
- name of handler
- $module_dir
- dirname of module
- $optional
- true if failure to load handler should be considered a warning, not an error
Returns
|
public
Xoops\Form\Form |boolean
|
#
getModuleForm( XoopsObject $obj, string $name, string $module_dir = null )
Get Module Form
Parameters
- $obj
- object to populate form
- $name
- name of form
- $module_dir
- dirname of associated module
Returns
|
public static
boolean|Xoops\Module\Helper\HelperAbstract
|
#
getModuleHelper( string $dirname )
Get Module Helper
Parameters
- $dirname
- dirname of module
Returns
|
public
boolean
|
#
loadLanguage( string $name, mixed $domain = '', string $language = null )
XOOPS language loader wrapper
Temporary solution, not encouraged to use
XOOPS language loader wrapper
Temporary solution, not encouraged to use
Parameters
- $name
- Name of language file to be loaded, without extension
- $domain
string: Module dirname; global language file will be loaded if
$domain is set to 'global' or not specified
array: example; array('Frameworks/moduleclasses/moduleadmin')
- $language
- Language to be loaded, current language content will be loaded if not specified
Returns
boolean
|
public static
boolean
|
#
loadLocale( string $domain = null, string $locale = null )
loadLocale
Parameters
- $domain
- Module dirname; global language file will be loaded if set to 'global' or not specified
- $locale
- Locale to be loaded, current language content will be loaded if not specified
Returns
boolean
|
public
string
|
#
translate( string $key, string $dirname = 'xoops' )
Translate a key value
Parameters
- $key
- constant name
- $dirname
- dirname of module (domain)
Returns
string
|
public
array
|
#
getActiveModules( )
Get active modules from cache file
Get active modules from cache file
Returns
array
|
public
array
|
#
setActiveModules( )
Write active modules to cache file
Write active modules to cache file
Returns
array
|
public
boolean
|
#
isActiveModule( string $dirname )
Checks is module is installed and active
Checks is module is installed and active
Parameters
- $dirname
- module directory
Returns
boolean
|
public
boolean|XoopsModule
|
#
getModuleByDirname( string $dirname )
get module object from module name (dirname)
get module object from module name (dirname)
Parameters
- $dirname
- dirname of the module
Returns
|
public
boolean|XoopsModule
|
|
public
string
|
#
alert( string $type, mixed $msg, string $title = '/' )
render an alert message to a string
render an alert message to a string
Parameters
- $type
- alert type, one of 'info', 'error', 'success' or 'warning'
- $msg
- string or array of strings
- $title
- title for alert
Returns
string
|
public
string
|
#
confirm( array $hiddens, string $action, string $msg, string $submit = '', boolean $addtoken = true )
Render a confirmation form to a string
Render a confirmation form to a string
Parameters
- $hiddens
- associative array of values used to complete confirmed action
- $action
- form action (URL)
- $msg
- message to display
- $submit
- submit button message
- $addtoken
- true to add CSRF token
Returns
string rendered confirm message
|
public
integer
|
#
getUserTimestamp( DateTime|integer $time )
Get User Timestamp (kind of pointless, since timestamps are UTC?)
Get User Timestamp (kind of pointless, since timestamps are UTC?)
Parameters
- $time
- DateTime object or unix timestamp
Returns
integer unix timestamp
|
public
integer
|
#
userTimeToServerTime( integer $timestamp, null $userTZ = null )
Function to calculate server timestamp from user entered time (timestamp)
Function to calculate server timestamp from user entered time (timestamp)
Parameters
- $timestamp
- time stamp
- $userTZ
- timezone
Returns
integer
|
public
int[]
|
#
getUserGroups( )
get the groups associated with the current user
get the groups associated with the current user
Returns
int[]
|
public
string
|
#
makePass( )
generate a temporary password
generate a temporary password
Returns
string
|
public
false|string
|
#
checkEmail( string $email, boolean $antispam = false )
Check Email
Parameters
- $email
- check email
- $antispam
- true if returned email should be have anti-SPAM measures applied
Returns
false|string email address if valid, otherwise false
|
public
string
|
#
formatURL( string $url )
formatURL - add default http:// if no valid protocol specified
formatURL - add default http:// if no valid protocol specified
Parameters
Returns
string
|
public
string
|
#
getBanner( )
Function to get banner html tags for use in templates
Function to get banner html tags for use in templates
Returns
string
|
public
|
#
redirect( string $url, integer $time = 3, string $message = '', boolean $addredirect = true, boolean $allowExternalLink = false )
Function to redirect a user to certain pages
Function to redirect a user to certain pages
Parameters
- $url
- URL to redirect to
- $time
- time to wait (to allow reading message display)
- $message
- message to display
- $addredirect
add xoops_redirect parameter with current URL to the redirect
URL - used for return from login redirect
- $allowExternalLink
- allow redirect to external URL
|
public static
|
#
simpleRedirect( string $url )
Do an immediate redirect to the specified url. Use this instead of using PHP's header()
directly so that a core.redirect.start event is triggered. An example is debugbar, that
stacks data so the details for both original and redirected scripts data are available.
Do an immediate redirect to the specified url. Use this instead of using PHP's header()
directly so that a core.redirect.start event is triggered. An example is debugbar, that
stacks data so the details for both original and redirected scripts data are available.
Parameters
|
public
string
|
#
getEnv( string $key )
Get Environment Value
Parameters
- $key
- key (name) in the environment
Returns
string
|
public
string
|
#
getCss( string $theme = '' )
Function to get css file for a certain themeset
Function to get css file for a certain themeset
Parameters
Returns
string
|
public
XoopsMailer |XoopsMailerLocale
|
|
public
string
|
#
getOption( string $key )
Get Option
Parameters
- $key
- key (name) of option
Returns
string
|
public
|
#
setOption( string $key, null $value = null )
Set Option
Parameters
- $key
- key (name) of option
- $value
- value for option
|
public
mixed
|
#
getConfig( string $key )
Get Config value
Parameters
- $key
- key (name) of configuration
Returns
mixed
|
public
array
|
|
public
|
#
addConfigs( array $configs, string $dirname = 'system' )
Add Config Values
Parameters
- $configs
- array of configs
- $dirname
- module name
|
public
|
#
setConfig( string $key, mixed $value = null, string $dirname = 'system' )
Set Config Value
Parameters
- $key
- key (name) of the configuration item
- $value
- configuration value
- $dirname
- dirname of module
|
public
|
#
unsetConfig( string $key, string $dirname = 'system' )
Unset Config Value
Parameters
- $key
- key (name) of the configuration item
- $dirname
- dirname of module
|
public
|
|
public
mixed
|
#
getModuleConfig( string $key, string $dirname = '' )
getModuleConfig
Parameters
- $key
- config name
- $dirname
- module directory
Returns
mixed the value for the named config
|
public
array
|
#
getModuleConfigs( string $dirname = '' )
Get Module Configs
Parameters
- $dirname
- dirname of module
Returns
array
|
public
|
#
appendConfig( string $key, array $values, boolean $appendWithKey = false, string $dirname = 'system' )
Append Config Value
Parameters
- $key
- key (name) of the configuration item
- $values
- array of configuration value
- $appendWithKey
true to add each $value element with associative value
false to add $values as a single index element
- $dirname
- dirname of module
|
public
|
#
disableModuleCache( )
Disables page cache by overriding module cache settings
Disables page cache by overriding module cache settings
|
public
Pdp\Uri\Url\Host|string|null
|
#
getBaseDomain( string $url, boolean $includeSubdomain = false, boolean $returnObject = false )
getBaseDomain
Get domain name from a URL. This will check that the domain is valid for registering,
preventing return of constructs like 'co.uk' as the domain. See https://publicsuffix.org/
Parameters
- $url
- URL
- $includeSubdomain
true to include include subdomains,
default is false registerable domain only
- $returnObject
true to return Pdp\Uri\Url\Host object
false returns domain as string
Returns
Pdp\Uri\Url\Host|string|null domain, or null if domain is invalid
|
public
boolean
|
#
templateTouch( string $tpl_id )
function to update compiled template file in cache folder
function to update compiled template file in cache folder
Parameters
Returns
boolean
|
public
|
|
public
|
#
deprecated( string $message )
Support for deprecated messages events
Support for deprecated messages events
Parameters
|
public
|
|