Introducing Module Helpers

The module helper is an easy way to access module related information, such as configurations, handlers and more. Using the module helper can simplify your code.


If you have a logger active, look at the Extra section.

Easy Access to Module object

XoopsModule(9)
  • contents
  • Available methods (71)
  • public modinfo -> NULL
    public adminmenu -> NULL
    public _msg -> NULL
    public vars -> array(13)
     valuerequireddata_typemaxlengthchangedoptionsenumeration
    "mid""15"FALSE3NULLFALSE""""
    "name""Xmfdemo"TRUE1150FALSE""""
    "version""100"FALSE3NULLFALSE""""
    "last_update"
    string(10) "1494707267"
    • timestamp
    • 2017-05-13 22:27:47
    FALSE3NULLFALSE""""
    "weight""1"FALSE3NULLFALSE""""
    "isactive""1"FALSE3NULLFALSE""""
    "dirname""xmfdemo"TRUE7NULLFALSE""""
    "hasmain""1"FALSE3NULLFALSE""""
    "hasadmin""1"FALSE3NULLFALSE""""
    "hassearch""0"FALSE3NULLFALSE""""
    "hasconfig""1"FALSE3NULLFALSE""""
    "hascomments""0"FALSE3NULLFALSE""""
    "hasnotification""0"FALSE3NULLFALSE""""
    public cleanVars -> array(0)
    public _isNew -> boolFALSE
    public _isDirty -> boolFALSE
    public _errors -> array(0)
    public _filters -> array(0)
  • public static getByDirname($dirname) -> mixed
    @param $dirname
    
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:437
    public XoopsObject()
    PHP 4 style constructor compatibility shim
    @deprecated all callers should be using parent::__construct()
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:122
    public __clone()
    Adjust a newly cloned object
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:985
    public __construct()
    Constructor
    
    Defined in <ROOT>/kernel/module.php:46
    public _loadFilters()
    load all additional filters that have been registered to the object
    
    @access private
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:900
    public assignVar($key, $value)
    assign a value to a variable
    
    @access public
    @param string $key   name of the variable to assign
    @param mixed  $value value to assign
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:215
    public assignVars($var_arr)
    assign values to multiple variables in a batch
    
    @access   private
    @param $var_arr
    @internal param array $var_array associative array of values to assign
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:268
    public checkAccess()
    Defined in <ROOT>/kernel/module.php:451
    public cleanVars() -> bool true if successful
    clean values of all variables of the object for storage.
    also add slashes wherever needed
    
    YOU SHOULD NOT USE ANY OF THE UNICODE TYPES, THEY WILL BE REMOVED
    
    @return bool true if successful
    @access public
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:703
    public destoryVars($var) -> bool
    @param $var
    @return bool
    @deprecated use destroyVars() instead,  destoryVars() will be removed in the next major release
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:337
    public destroyVars($var) -> bool
    unset variable(s) for the object
    
    @access public
    
    @param mixed $var
    
    @return bool
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:316
    public dirname($format = "") -> mixed
    Returns Class Base Variable dirname
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:367
    public executeSQL() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:526
    public executeScript($type, $state = 2) -> bool
    @param     $type
    @param int $state
    
    @return bool
    
    Defined in <ROOT>/kernel/module.php:602
    public &getAdminMenu() -> string
    Get the admin menu for the module
    
    @return string
    
    Defined in <ROOT>/kernel/module.php:212
    public getCurrentPage() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:483
    public getErrors() -> array an array of errors
    return the errors for this object as an array
    
    @return array an array of errors
    @access public
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:1013
    public getHtmlErrors() -> string html listing the errors
    return the errors for this object as html
    
    @return string html listing the errors
    @access public
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:1024
    public &getInfo($name = NULL) -> array |string Array of module information.
    Get module info
    
    @param  string $name
    @return array  |string    Array of module information.
    If {@link $name} is set, returns a single module information item as string.
    
    Defined in <ROOT>/kernel/module.php:143
    public getMessages() -> array an array of messages
    return the messages for this object as an array
    
    @return array an array of messages
    @access public
    
    Defined in <ROOT>/kernel/module.php:113
    public getValues($keys = NULL, $format = s, $maxDepth = 1) -> array associative array of key->value pairs
    Returns the values of the specified variables
    
    @param  mixed  $keys     An array containing the names of the keys to retrieve, or null to get all of them
    @param  string $format   Format to use (see getVar)
    @param  int    $maxDepth Maximum level of recursion to use if some vars are objects themselves
    @return array  associative array of key->value pairs
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:385
    public getVar($key, $format = s) -> mixed formatted value of the variable
    returns a specific variable for the object in a proper format
    
    YOU SHOULD NOT USE ANY OF THE UNICODE TYPES, THEY WILL BE REMOVED
    
    @access public
    @param  string $key    key of the object's variable to be returned
    @param  string $format format to use for the output
    @return mixed  formatted value of the variable
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:416
    public &getVars() -> array associative array of key->value pairs
    returns all variables for the object
    
    @access public
    @return array associative array of key->value pairs
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:372
    public gettemplate($template, $block = false) -> bool
    @param      $template
    @param bool $block
    
    @return bool
    
    Defined in <ROOT>/kernel/module.php:549
    public hasadmin($format = "") -> mixed
    Returns Class Base Variable hasadmin
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:387
    public hascomments($format = "") -> mixed
    Returns Class Base Variable hascomments
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:417
    public hasconfig($format = "") -> mixed
    Returns Class Base Variable hasconfig
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:407
    public hasmain($format = "") -> mixed
    Returns Class Base Variable hasmain
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:377
    public hasnotification($format = "") -> mixed
    Returns Class Base Variable hasnotification
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:427
    public hassearch($format = "") -> mixed
    Returns Class Base Variable hassearch
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:397
    public id($format = N) -> mixed
    Returns Class Base Variable mid
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:297
    public initVar($key, $data_type, $value = NULL, $required = false, $maxlength = NULL, $options = "", $enumerations = "") -> void
    initialize variables for the object
    
    YOU SHOULD NOT USE THE $enumeration PARAMETER
    
    @access   public
    
    @param string $key
    @param int    $data_type set to one of XOBJ_DTYPE_XXX constants (set to XOBJ_DTYPE_OTHER if no data type checking nor text sanitizing is required)
    @param null   $value
    @param bool   $required  require html form input?
    @param int    $maxlength for XOBJ_DTYPE_TXTBOX type only
    @param string $options
    @param string $enumerations
    
    @return void
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:196
    public insert() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:516
    public insertBlocks() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:559
    public insertConfig() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:579
    public insertConfigCategories() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:569
    public insertGroupPermissions($groups, $type) -> bool
    @param $groups
    @param $type
    
    @return bool
    
    Defined in <ROOT>/kernel/module.php:615
    public insertProfileFields() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:589
    public insertTemplates() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:536
    public install($admingroups = array(), $accessgroups = array()) -> bool
    @param array $admingroups
    @param array $accessgroups
    
    @return bool
    
    Defined in <ROOT>/kernel/module.php:496
    public isDirty() -> bool
    @return bool
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:174
    public isNew() -> bool
    @return bool
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:148
    public isactive($format = "") -> mixed
    Returns Class Base Variable isactive
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:357
    public last_update($format = "") -> mixed
    Returns Class Base Variable last_update
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:337
    public loadAdminMenu()
    Load the admin menu for the module
    
    Defined in <ROOT>/kernel/module.php:198
    public loadErrorMessages() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:473
    public loadFilters($method)
    load all local filters for the object
    
    Filter distribution:
    In each module folder there is a folder "filter" containing filter files with,
    filename: [name_of_target_class][.][function/action_name][.php];
    function name: [dirname][_][name_of_target_class][_][function/action_name];
    parameter: the target object
    
    @param string $method function or action name
    
    @deprecated \XoopsObject::loadFilters is deprecated since XOOPS 2.5.8 and will be removed in the next major release
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:932
    public loadInfo($dirname, $verbose = true) -> bool true if loaded
    Load the module info for this module
    
    @param string $dirname Module directory
    @param bool   $verbose Give an error on fail?
    
    @return bool true if loaded
    
    Defined in <ROOT>/kernel/module.php:229
    public loadInfoAsVar($dirname, $verbose = true)
    Load module info
    
    @param string  $dirname Directory Name
    @param boolean $verbose
    
    Defined in <ROOT>/kernel/module.php:71
    public loadLanguage($type = main) -> bool
    @param string $type
    
    @return bool
    
    Defined in <ROOT>/kernel/module.php:463
    public mainLink() -> string FALSE on fail
    Get a link to the modules main page
    
    @return string FALSE on fail
    
    Defined in <ROOT>/kernel/module.php:165
    public mid($format = "") -> mixed
    Returns Class Base Variable mid
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:307
    public name($format = "") -> mixed
    Returns Class Base Variable name
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:317
    public registerFilter($filtername)
    dynamically register additional filter for the object
    
    @param string $filtername name of the filter
    
    @deprecated \XoopsObject::registerFilter is deprecated since XOOPS 2.5.8 and will be removed in the next major release
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:888
    public search($term = "", $andor = AND, $limit = 0, $offset = 0, $userid = 0) -> mixed Search result.
    Search contents within a module
    
    @param  string  $term
    @param  string  $andor 'AND' or 'OR'
    @param  integer $limit
    @param  integer $offset
    @param  integer $userid
    @return mixed   Search result.
    
    Defined in <ROOT>/kernel/module.php:269
    public setDirty()
    *#@+
    mark modified objects as dirty
    
    used for modified objects only
    
    @access public
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:161
    public setErrors($err_str)
    add an error
    
    @param $err_str
    @internal param string $value error to add
    @access   public
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:998
    public setFormVars($var_arr = NULL, $pref = xo_, $not_gpc = false)
    Assign values to multiple variables in a batch
    
    Meant for a CGI context:
    - prefixed CGI args are considered save
    - avoids polluting of namespace with CGI args
    
    @access private
    @param array  $var_arr associative array of values to assign
    @param string $pref    prefix (only keys starting with the prefix will be set)
    @param bool   $not_gpc
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:356
    public setInfo($name, $value) -> bool
    Set module info
    
    @param  string $name
    @param  mixed  $value
    @return bool
    */
    
    Defined in <ROOT>/kernel/module.php:125
    public setMessage($str)
    add a message
    
    @param string $str message to add
    @access public
    
    Defined in <ROOT>/kernel/module.php:102
    public setNew()
    *#@+
    used for new/clone objects
    
    @access public
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:135
    public setVar($key, $value, $not_gpc = false)
    assign a value to a variable
    
    @access public
    @param string $key   name of the variable to assign
    @param mixed  $value value to assign
    @param bool   $not_gpc
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:283
    public setVars($var_arr, $not_gpc = false)
    assign values to multiple variables in a batch
    
    @access private
    @param array $var_arr associative array of values to assign
    @param bool  $not_gpc
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:300
    public subLink() -> string
    Get links to the subpages
    
    @return string
    
    Defined in <ROOT>/kernel/module.php:181
    public toArray() -> array
    Returns an array representation of the object
    
    Deprecated, use getValues() directly
    
    @return array
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:1045
    public unsetDirty()
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:166
    public unsetNew()
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:140
    public update() -> bool
    @return bool
    
    Defined in <ROOT>/kernel/module.php:506
    public version($format = "") -> mixed
    Returns Class Base Variable version
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:327
    public weight($format = "") -> mixed
    Returns Class Base Variable weight
    @param  string $format
    @return mixed
    
    Defined in <ROOT>/kernel/module.php:347
    public xoopsClone() -> object clone
    create a clone(copy) of the current object
    
    @access public
    @return object clone
    
    Inherited from XoopsObject
    Defined in <ROOT>/kernel/object.php:968
name: Xmfdemo
mid: 15
version: 100

Simplify Reading Module Configs

array(2)
'config1' => string(29) "this is my test config1 value"
'config2' => string(29) "this is my test config2 value"
config1: this is my test config1 value
config2: this is my test config2 value
config3:
config3: my default

Access to Another Module

Xmf\Module\Helper(5)
  • contents
  • Available methods (16)
  • protected dirname -> string(2) "pm"
    protected object -> NULL
    protected handlers -> NULL
    protected configs -> NULL
    protected debug -> NULL
  • public static getHelper($dirname = system) -> \Xmf\Module\Helper|\Xoops\Module\Helper|false a Helper object of false on error
    Get an instance of a module helper for the module identified by $dirname
    
    @param string $dirname module directory
    
    @return \Xmf\Module\Helper|\Xoops\Module\Helper|false a Helper object of false on error
    
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper.php:39
    public addLog($log) -> void
    Add a message to the module log
    
    @param string $log log message
    
    @return void
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:246
    public getConfig($name = NULL, $default = NULL) -> mixed string config item, array of config items,
    get a module config item
    
    @param string $name    name of config item, or blank for all items
    @param mixed  $default default value to return if config $name is not set
    
    @return mixed string config item, array of config items,
    or null if config not found
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:94
    public getHandler($name) -> bool|XoopsObjectHandler|XoopsPersistableObjectHandler
    Get an Object Handler
    
    @param string $name name of handler to load
    
    @return bool|XoopsObjectHandler|XoopsPersistableObjectHandler
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:122
    public getModule() -> XoopsModule
    get the module object
    
    @return XoopsModule
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:73
    public isCurrentModule() -> bool
    Is this the currently active module?
    
    @return bool
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:266
    public isUserAdmin() -> bool true is user has admin right, else false
    Does user have admin rights to this module?
    
    @return bool true is user has admin right, else false
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:280
    public loadLanguage($name) -> bool
    load a language file for this module
    
    @param string $name basename of language file (i.e. 'admin')
    
    @return bool
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:216
    public path($path = "") -> string
    Return absolute filesystem path for a module relative path
    
    @param string $path module relative file system path
    
    @return string
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:305
    public redirect($url, $time = 3, $message = "") -> void
    Redirect the user to a page within this module
    
    @param string $url     module relative url (i.e. index.php)
    @param int    $time    time in seconds to show redirect message
    @param string $message redirect message
    
    @return void
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:319
    public setDebug($bool = true) -> void
    Set debug option on or off
    
    @param bool $bool true to turn on debug logging, false for off
    
    @return void
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:234
    public url($url = "") -> string
    Return absolute URL for a module relative URL
    
    @param string $url module relative URL
    
    @return string
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:293
    protected __construct($dirname)
    class constructor
    
    @param string $dirname a module directory name
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:63
    protected initConfig() -> void
    get module configs
    
    @return void
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:165
    protected initHandler($name) -> void
    get a handler instance and store in $this->_handlers
    
    @param string $name name of handler to load
    
    @return void
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:188
    protected initObject() -> void
    get a module object
    
    @return void
    
    Inherited from Xmf\Module\Helper\GenericHelper
    Defined in <ROOT>/class/libraries/vendor/xoops/xmf/src/Xmf/Module/Helper/GenericHelper.php:145
PmMessageHandler(9)
  • contents
  • Available methods (35)
  • public handler -> NULL
    public handlers -> array(5)
    'read' => NULL
    'stats' => NULL
    'joint' => NULL
    'write' => NULL
    'sync' => NULL
    public table -> string(14) "demo_priv_msgs"
    public keyName -> string(6) "msg_id"
    public className -> string(9) "PmMessage"
    public identifierName -> string(7) "subject"
    public field_link -> NULL
    public field_object -> NULL
    public db -> XoopsMySQLDatabaseSafe(4)
    • contents
    • Available methods (27)
    • public conn -> mysqli(19)
      • contents
      • Available methods (43)
      • public affected_rows -> NULL
        public client_info -> NULL
        public client_version -> NULL
        public connect_errno -> NULL
        public connect_error -> NULL
        public errno -> NULL
        public error -> NULL
        public error_list -> NULL
        public field_count -> NULL
        public host_info -> NULL
        public info -> NULL
        public insert_id -> NULL
        public server_info -> NULL
        public server_version -> NULL
        public stat -> NULL
        public sqlstate -> NULL
        public protocol_version -> NULL
        public thread_id -> NULL
        public warning_count -> NULL
      • public static poll(array &$read, array &$write, array &$error, $sec, $usec)
        Defined in :
        public __construct($host, $user, $password, $database, $port, $socket)
        Defined in :
        public autocommit($mode)
        Defined in :
        public begin_transaction($flags, $name)
        Defined in :
        public change_user($user, $password, $database)
        Defined in :
        public character_set_name()
        Defined in :
        public close()
        Defined in :
        public commit($flags, $name)
        Defined in :
        public connect($host, $user, $password, $database, $port, $socket)
        Defined in :
        public debug($debug_options)
        Defined in :
        public dump_debug_info()
        Defined in :
        public escape_string($string_to_escape)
        Defined in :
        public get_charset()
        Defined in :
        public get_client_info()
        Defined in :
        public get_connection_stats()
        Defined in :
        public get_server_info()
        Defined in :
        public get_warnings()
        Defined in :
        public init()
        Defined in :
        public kill($connection_id)
        Defined in :
        public more_results()
        Defined in :
        public multi_query($query)
        Defined in :
        public next_result()
        Defined in :
        public options($option, $value)
        Defined in :
        public ping()
        Defined in :
        public prepare($query)
        Defined in :
        public query($query, $resultmode)
        Defined in :
        public real_connect($host, $user, $password, $database, $port, $socket, $flags)
        Defined in :
        public real_escape_string($string_to_escape)
        Defined in :
        public real_query($query)
        Defined in :
        public reap_async_query()
        Defined in :
        public refresh($options)
        Defined in :
        public release_savepoint($name)
        Defined in :
        public rollback($flags, $name)
        Defined in :
        public savepoint($name)
        Defined in :
        public select_db($database)
        Defined in :
        public set_charset($charset)
        Defined in :
        public set_opt($option, $value)
        Defined in :
        public ssl_set($key, $cert, $certificate_authority, $certificate_authority_path, $cipher)
        Defined in :
        public stat()
        Defined in :
        public stmt_init()
        Defined in :
        public store_result($flags)
        Defined in :
        public thread_safe()
        Defined in :
        public use_result()
        Defined in :
      public prefix -> string(4) "demo"
      public logger -> XoopsLogger(10)
      • contents
      • Available methods (24)
      • public queries -> array(7)
         sqlerrorerrnoquery_time
        #1"SET SQL_BIG_SELECTS = 1"NULLNULL0.000181913375854
        #2"SELECT mid FROM demo_modules WHERE dirname='rmcommon'"NULLNULL0.000952959060669
        #3"SELECT * FROM demo_config WHERE conf_modid='5'"NULLNULL0.00127100944519
        #4"SELECT dirname FROM demo_modules WHERE isactive='1'"NULLNULL0.000512838363647
        #5"select conf_value from demo_config where conf_name = 'theme_set' and conf_modid = 0;"NULLNULL0.00063419342041
        #6"SELECT * FROM demo_mod_rmcommon_settings WHERE element='lightbox'"NULLNULL0.00168108940125
        #7"SELECT * FROM demo_config WHERE (conf_modid = '0' AND conf_catid = '1') ORDER BY conf_order ASC"NULLNULL0.00083589553833
        public blocks -> array(0)
        public extra -> array(0)
        public logstart -> array(2)
        'XOOPS' => float1574382536.62
        'XOOPS Boot' => float1574382536.62
        public logend -> array(1)
        'query_time' => float1574382536.62
        public errors -> array(0)
        public deprecated -> array(0)
        public usePopup -> boolFALSE
        public activated -> boolFALSE
        public renderingEnabled -> boolFALSE
      • public static getInstance() -> object XoopsLogger reference to the only instance
        Get a reference to the only instance of this class
        
        @return object XoopsLogger  reference to the only instance
        
        Defined in <ROOT>/class/logger/xoopslogger.php:86
        public XoopsLogger()
        XoopsLogger::XoopsLogger()
        
        Defined in <ROOT>/class/logger/xoopslogger.php:69
        public __construct()
        XoopsLogger::__construct()
        
        Defined in <ROOT>/class/logger/xoopslogger.php:62
        public addBlock($name, $cached = false, $cachetime = 0)
        Log display of a block
        
        @param string $name      name of the block
        @param bool   $cached    was the block cached?
        @param int    $cachetime cachetime of the block
        
        Defined in <ROOT>/class/logger/xoopslogger.php:172
        public addDeprecated($msg)
        Log messages for deprecated functions
        
        @deprecated
        
        @param int $msg text message for the entry
        
        
        Defined in <ROOT>/class/logger/xoopslogger.php:200
        public addExtra($name, $msg)
        Log extra information
        
        @param string $name name for the entry
        @param int    $msg  text message for the entry
        
        Defined in <ROOT>/class/logger/xoopslogger.php:185
        public addQuery($sql, $error = NULL, $errno = NULL, $query_time = NULL)
        Log a database query
        
        @param string $sql   SQL string
        @param string $error error message (if any)
        @param int    $errno error number (if any)
        @param null   $query_time
        
        Defined in <ROOT>/class/logger/xoopslogger.php:158
        public dump($mode = "")
        *#@+
        
        @protected
        @param string $mode
        @return
        
        Defined in <ROOT>/class/logger/xoopslogger.php:317
        public dumpAll()
        *#@+
        
        @deprecated
        
        Defined in <ROOT>/class/logger/xoopslogger.php:377
        public dumpBlocks() -> dump
        dnmp Blocks @deprecated
        
        @return dump
        
        Defined in <ROOT>/class/logger/xoopslogger.php:389
        public dumpExtra() -> dimp
        dumpExtra @deprecated
        
        @return dimp
        
        Defined in <ROOT>/class/logger/xoopslogger.php:401
        public dumpQueries() -> unknown
        dump Queries @deprecated
        
        @return unknown
        
        Defined in <ROOT>/class/logger/xoopslogger.php:413
        public dumpTime($name = XOOPS, $unset = false) -> float current execution time of the counter
        get the current execution time of a timer
        
        @param  string $name  name of the counter
        @param  bool   $unset removes counter from global log
        @return float  current execution time of the counter
        
        Defined in <ROOT>/class/logger/xoopslogger.php:331
        public enableRendering()
        Enable logger output rendering
        When output rendering is enabled, the logger will insert its output within the page content.
        If the string <!--{xo-logger-output}--> is found in the page content, the logger output will
        replace it, otherwise it will be inserted after all the page output.
        
        Defined in <ROOT>/class/logger/xoopslogger.php:106
        public handleError($errno, $errstr, $errfile, $errline)
        Error handling callback (called by the zend engine)
        
        @param integer $errno
        @param string  $errstr
        @param string  $errfile
        @param string  $errline
        
        Defined in <ROOT>/class/logger/xoopslogger.php:215
        public handleException($e) -> void
        Exception handling callback.
        
        @param \Exception|\Throwable $e uncaught Exception or Error
        
        @return void
        
        Defined in <ROOT>/class/logger/xoopslogger.php:251
        public instance()
        Deprecated, use getInstance() instead
        
        Defined in <ROOT>/class/logger/xoopslogger.php:76
        public microtime() -> float
        Returns the current microtime in seconds.
        
        @return float
        
        Defined in <ROOT>/class/logger/xoopslogger.php:119
        public render($output) -> string
        Output buffering callback inserting logger dump in page output
        @param $output
        @return string
        
        Defined in <ROOT>/class/logger/xoopslogger.php:292
        public sanitizePath($path) -> mixed|string
        @access protected
        
        @param string $path
        
        @return mixed|string
        
        Defined in <ROOT>/class/logger/xoopslogger.php:280
        public startTime($name = XOOPS)
        Start a timer
        
        @param string $name name of the timer
        
        Defined in <ROOT>/class/logger/xoopslogger.php:131
        public stopTime($name = XOOPS)
        Stop a timer
        
        @param string $name name of the timer
        
        Defined in <ROOT>/class/logger/xoopslogger.php:143
        public triggerError($errkey = 0, $errStr = "", $errFile = "", $errLine = "", $errNo = 0) -> void
        XoopsLogger::triggerError()
        
        @deprecated
        @param  int     $errkey
        @param  string  $errStr
        @param  string  $errFile
        @param  string  $errLine
        @param  integer $errNo
        @return void
        
        Defined in <ROOT>/class/logger/xoopslogger.php:361
        protected isThrowable($e) -> bool true if related to Throwable or Exception, otherwise false
        Determine if an object implements Throwable (or is an Exception that would under PHP 7.)
        
        @param mixed $e Expected to be an object related to Exception or Throwable
        
        @return bool true if related to Throwable or Exception, otherwise false
        
        Defined in <ROOT>/class/logger/xoopslogger.php:266
      public allowWebChanges -> boolFALSE
    • public __construct()
      XoopsDatabase constructor.
      
      Inherited from XoopsDatabase
      Defined in <ROOT>/class/database/database.php:66
      public close() -> void
      Close MySQL connection
      
      @return void
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:186
      public connect($selectdb = true) -> bool successful?
      connect to the database
      
      @param bool $selectdb select the database now?
      @return bool successful?
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:48
      public errno() -> int Returns the error number from the last MySQL function, or 0 (zero) if no error occurred.
      Returns the numerical value of the error message from previous MySQL operation
      
      @return int Returns the error number from the last MySQL function, or 0 (zero) if no error occurred.
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:218
      public error() -> string Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.
      Returns the text of the error message from previous MySQL operation
      
      @return string Returns the error text from the last MySQL function, or '' (the empty string) if no error occurred.
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:208
      public escape($string) -> string
      Escapes a string for use in a query. Does not add surrounding quotes.
      
      @param string $string string to escape
      
      @return string
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:254
      public fetchArray($result) -> array|false false on end of data
      Fetch a result row as an associative array
      
      @param mysqli_result $result
      
      @return array|false false on end of data
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:117
      public fetchBoth($result) -> array|false false on end of data
      Fetch a result row as an associative array
      
      @param mysqli_result $result
      
      @return array|false false on end of data
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:131
      public fetchObject($result) -> stdClass|false false on end of data
      XoopsMySQLiDatabase::fetchObjected()
      
      @param mixed $result
      @return stdClass|false false on end of data
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:143
      public fetchRow($result) -> array|false false on end of data
      Get a result row as an enumerated array
      
      @param mysqli_result $result
      
      @return array|false false on end of data
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:104
      public freeRecordSet($result) -> void
      will free all memory associated with the result identifier result.
      
      @param mysqli_result $result result
      
      @return void
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:198
      public genId($sequence) -> int always 0, because mysql has support for autoincrement
      generate an ID for a new row
      
      This is for compatibility only. Will always return 0, because MySQL supports
      autoincrement for primary keys.
      
      @param string $sequence name of the sequence from which to get the next ID
      @return int always 0, because mysql has support for autoincrement
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:92
      public getAffectedRows() -> int
      Get number of affected rows
      
      @return int
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:176
      public getFieldName($result, $offset) -> string
      Get field name
      
      @param mysqli_result $result query result
      @param int           $offset numerical field index
      
      @return string
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:341
      public getFieldType($result, $offset) -> string
      Get field type
      
      @param mysqli_result $result query result
      @param int           $offset numerical field index
      
      @return string
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:354
      public getFieldsNum($result) -> int
      Get number of fields in result
      
      @param mysqli_result $result query result
      
      @return int
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:451
      public getInsertId() -> int
      Get the ID generated from the previous INSERT operation
      
      @return int
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:154
      public getRowsNum($result) -> int
      Get number of rows in result
      
      @param mysqli_result $result
      
      @return int
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:166
      public getServerVersion() -> string
      getServerVersion get version of the mysql server
      
      @return string
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:461
      public prefix($tablename = "") -> string prefixed tablename, just prefix if tablename is empty
      attach the prefix.'_' to a given tablename
      
      if tablename is empty, only prefix will be returned
      
      @param  string $tablename tablename
      @return string prefixed tablename, just prefix if tablename is empty
      
      Inherited from XoopsDatabase
      Defined in <ROOT>/class/database/database.php:101
      public query($sql, $limit = 0, $start = 0) -> resource query result or FALSE if successful
      perform a query on the database
      
      @param string $sql   a valid MySQL query
      @param int    $limit number of records to return
      @param int    $start offset of first record to return
      @return resource query result or FALSE if successful
      or TRUE if successful and no result
      
      Defined in <ROOT>/class/database/mysqldatabase.php:486
      public queryF($sql, $limit = 0, $start = 0) -> mysqli_result|bool query result or FALSE if successful
      perform a query on the database
      
      @param string $sql   a valid MySQL query
      @param int    $limit number of records to return
      @param int    $start offset of first record to return
      @return mysqli_result|bool query result or FALSE if successful
      or TRUE if successful and no result
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:268
      public queryFromFile($file) -> bool FALSE if failed reading SQL file or TRUE if the file has been read and queries executed
      perform queries from SQL dump file in a batch
      
      @param string $file file path to an SQL dump file
      @return bool FALSE if failed reading SQL file or TRUE if the file has been read and queries executed
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:312
      public quote($string) -> string
      Quotes a string for use in a query.
      
      @param string $string string to quote/escape for use in query
      
      @return string
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:241
      public quoteString($str) -> string escaped string text with single quotes around
      Returns escaped string text with single quotes around it to be safely stored in database
      
      @param string $str unescaped string text
      @return string escaped string text with single quotes around
      
      Inherited from XoopsMySQLDatabase
      Defined in <ROOT>/class/database/mysqldatabase.php:229
      public setLogger(XoopsLogger $logger)
      assign a {@link XoopsLogger} object to the database
      
      @see XoopsLogger
      @param XoopsLogger $logger reference to a {@link XoopsLogger} object
      
      Inherited from XoopsDatabase
      Defined in <ROOT>/class/database/database.php:78
      public setPrefix($value)
      set the prefix for tables in the database
      
      @param string $value table prefix
      
      Inherited from XoopsDatabase
      Defined in <ROOT>/class/database/database.php:88
  • public XoopsObjectHandler($db)
    PHP 4 style constructor compatibility shim
    
    @param XoopsDatabase $db database object
    @deprecated all callers should be using parent::__construct()
    
    Inherited from XoopsObjectHandler
    Defined in <ROOT>/kernel/object.php:1088
    public XoopsPersistableObjectHandler(XoopsDatabase $db = NULL, $table = "", $className = "", $keyName = "", $identifierName = "")
    PHP 4 style constructor compatibility shim
    
    @param null|XoopsDatabase $db             database connection
    @param string             $table          Name of database table
    @param string             $className      Name of the XoopsObject class this handler manages
    @param string             $keyName        Name of the property holding the key
    @param string             $identifierName Name of the property holding an identifier
    name (title, name ...), used on getList()
    
    @deprecated all callers should be using parent::__construct()
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1241
    public __call($name, $args) -> mixed
    Magic method for overloading of delegation
    
    To be enabled in XOOPS 3.0 with PHP 5
    
    @access protected
    @param  string $name method name
    @param  array  $args arguments
    @return mixed
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1316
    public __construct(XoopsDatabase $db)
    @param null|XoopsDatabase $db
    
    Defined in <ROOT>/modules/pm/class/message.php:59
    public cleanOrphan($table_link = "", $field_link = "", $field_object = "") -> bool true on success
    Clean orphan objects against linked objects
    
    @param  string $table_link   table of linked object for JOIN
    @param  string $field_link   field of linked object for JOIN
    @param  string $field_object field of current object for JOIN
    @return bool   true on success
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1675
    public convertResultSet($result, $id_as_key = false, $as_object = true)
    *#@-
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1705
    public create($isNew = true) -> XoopsObject {@link XoopsObject}
    create a new object
    
    @param  bool $isNew Flag the new objects as new
    @return XoopsObject {@link XoopsObject}
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1341
    public delete(XoopsObject $object, $force = false) -> bool FALSE if failed.
    delete an object from the database
    
    @param  XoopsObject $object {@link XoopsObject} reference to the object to delete
    @param  bool        $force
    @return bool        FALSE if failed.
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1417
    public deleteAll(CriteriaElement $criteria = NULL, $force = true, $asObject = false) -> bool
    delete all objects matching the conditions
    
    @param  CriteriaElement $criteria {@link CriteriaElement} with conditions to meet
    @param  bool            $force    force to delete
    @param  bool            $asObject delete in object way: instantiate all objects and delete one by one
    @return bool
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1432
    public deleteByLink(CriteriaElement $criteria = NULL) -> int count of objects
    Delete objects matching a condition against linked objects
    
    @param  CriteriaElement $criteria {@link CriteriaElement} to match
    @return int             count of objects
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1652
    public get($id = NULL, $fields = NULL) -> XoopsObject {@link XoopsObject}
    Load a {@link XoopsObject} object from the database
    
    @access protected
    @param  mixed $id     ID
    @param  array $fields fields to fetch
    @return XoopsObject {@link XoopsObject}
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1359
    public &getAll(CriteriaElement $criteria = NULL, $fields = NULL, $asObject = true, $id_as_key = true) -> array of objects/array {@link XoopsObject}
    get all objects matching a condition
    
    @param  CriteriaElement $criteria  {@link CriteriaElement} to match
    @param  array           $fields    variables to fetch
    @param  bool            $asObject  flag indicating as object, otherwise as array
    @param  bool            $id_as_key use the ID as key for the array
    @return array           of objects/array {@link XoopsObject}
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1487
    public &getByLimit($limit = 0, $start = 0, CriteriaElement $criteria = NULL, $fields = NULL, $asObject = true) -> array of objects {@link XoopsObject}
    get a limited list of objects matching a condition
    
    {@link CriteriaCompo}
    
    @param  int             $limit    Max number of objects to fetch
    @param  int             $start    Which record to start at
    @param  CriteriaElement $criteria {@link CriteriaElement} to match
    @param  array           $fields   variables to fetch
    @param  bool            $asObject flag indicating as object, otherwise as array
    @return array           of objects     {@link XoopsObject}
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1537
    public &getByLink(CriteriaElement $criteria = NULL, $fields = NULL, $asObject = true, $field_link = NULL, $field_object = NULL) -> array of objects {@link XoopsObject}
    get a list of objects matching a condition joint with another related object
    
    @param  CriteriaElement $criteria     {@link CriteriaElement} to match
    @param  array           $fields       variables to fetch
    @param  bool            $asObject     flag indicating as object, otherwise as array
    @param  string          $field_link   field of linked object for JOIN
    @param  string          $field_object field of current object for JOIN
    @return array           of objects {@link XoopsObject}
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1595
    public getCount(CriteriaElement $criteria = NULL) -> int count of objects
    count objects matching a condition
    
    @param  CriteriaElement $criteria {@link CriteriaElement} to match
    @return int             count of objects
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1558
    public getCountByLink(CriteriaElement $criteria = NULL) -> int count of objects
    Count of objects matching a condition
    
    @param  CriteriaElement $criteria {@link CriteriaElement} to match
    @return int             count of objects
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1609
    public getCounts(CriteriaElement $criteria = NULL) -> array of counts
    Get counts of objects matching a condition
    
    @param  CriteriaElement $criteria {@link CriteriaElement} to match
    @return array           of counts
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1571
    public getCountsByLink(CriteriaElement $criteria = NULL) -> int count of objects
    array of count of objects matching a condition of, groupby linked object keyname
    
    @param  CriteriaElement $criteria {@link CriteriaElement} to match
    @return int             count of objects
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1623
    public &getIds(CriteriaElement $criteria = NULL) -> array of object IDs
    get IDs of objects matching a condition
    
    @param  CriteriaElement $criteria {@link CriteriaElement} to match
    @return array           of object IDs
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1517
    public getList(CriteriaElement $criteria = NULL, $limit = 0, $start = 0) -> array
    Retrieve a list of objects data
    
    @param  CriteriaElement $criteria {@link CriteriaElement} conditions to be met
    @param  int             $limit    Max number of objects to fetch
    @param  int             $start    Which record to start at
    @return array
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1503
    public &getObjects(CriteriaElement $criteria = NULL, $id_as_key = false, $as_object = true) -> array
    Retrieve objects from the database
    
    @param  CriteriaElement $criteria  {@link CriteriaElement} conditions to be met
    @param  bool            $id_as_key use the ID as key for the array
    @param  bool            $as_object return an array of objects
    @return array
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1470
    public getPruneForm() -> XoopsForm
    Get {@link XoopsForm} for setting prune criteria
    
    @return XoopsForm
    */
    
    Defined in <ROOT>/modules/pm/class/message.php:196
    public getSavecount(XoopsUser $user = NULL) -> int
    get user's message count in savebox
    @param  XoopsUser $user
    @return int
    */
    
    Defined in <ROOT>/modules/pm/class/message.php:134
    public insert(XoopsObject $object, $force = true) -> mixed object ID
    insert an object into the database
    
    @param  XoopsObject $object {@link XoopsObject} reference to object
    @param  bool        $force  flag to force the query execution despite security settings
    @return mixed       object ID
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1403
    public loadHandler($name, $args = NULL) -> XoopsModelAbstract of handler {@link XoopsModelAbstract}
    Load predefined handler
    
    @access protected
    @param  string $name handler name
    @param  mixed  $args args
    @return XoopsModelAbstract of handler {@link XoopsModelAbstract}
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1280
    public sendEmail( UNDEFINED CLASS (XoopsPrivmessage) $pm, XoopsUser $user) -> bool
    Send a message to user's email
    @param  XoopsPrivmessage $pm {@link XoopsPrivmessage} object
    @param  XoopsUser $user
    @return bool
    */
    
    Defined in <ROOT>/modules/pm/class/message.php:157
    public setFromdelete(PmMessage $pm, $val = 1) -> bool
    Mark a message as from_delete = 1 or removes it if the recipient has also deleted it
    @param  PmMessage $pm {@link PmMessage} object
    @param  int    $val
    @return bool
    
    Defined in <ROOT>/modules/pm/class/message.php:83
    public setFromsave(PmMessage $pm, $val = 1) -> bool
    Mark a message as from_save = 1
    @param  PmMessage $pm {@link PmMessage} object
    @param  int    $val
    @return bool
    
    Defined in <ROOT>/modules/pm/class/message.php:113
    public setHandler($handler = NULL, $args = NULL, $path = NULL) -> object of handler
    Set custom handler
    
    @access   protected
    @param null|string   $handler
    @param null   $args
    @param string $path path to class
    @internal param object $handler
    @internal param mixed  $args
    @return object of handler
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1259
    public setRead(PmMessage $pm, $val = 1) -> bool
    Mark a message as read
    
    @param PmMessage $pm {@link PmMessage} object
    @param int    $val
    
    @return bool
    
    Defined in <ROOT>/modules/pm/class/message.php:72
    public setTodelete(PmMessage $pm, $val = 1) -> bool
    Mark a message as to_delete = 1 or removes it if the sender has also deleted it or sent by anonymous
    @param  PmMessage $pm {@link PmMessage} object
    @param  int    $val
    @return bool
    
    Defined in <ROOT>/modules/pm/class/message.php:98
    public setTosave(PmMessage $pm, $val = 1) -> bool
    Mark a message as to_save = 1
    @param  PmMessage $pm {@link PmMessage} object
    @param  int    $val
    @return bool
    
    Defined in <ROOT>/modules/pm/class/message.php:124
    public synchronization() -> bool true on success
    Synchronizing objects
    
    @return bool true on success
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1688
    public updateAll($fieldname, $fieldvalue, CriteriaElement $criteria = NULL, $force = false) -> bool
    Change a field for objects with a certain criteria
    
    @param  string          $fieldname  Name of the field
    @param  mixed           $fieldvalue Value to write
    @param  CriteriaElement $criteria   {@link CriteriaElement}
    @param  bool            $force      force to query
    @return bool
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1448
    public updateByLink($data, CriteriaElement $criteria = NULL) -> int count of objects
    update objects matching a condition against linked objects
    
    @param  array           $data     array of key => value
    @param  CriteriaElement $criteria {@link CriteriaElement} to match
    @return int             count of objects
    
    Inherited from XoopsPersistableObjectHandler
    Defined in <ROOT>/kernel/object.php:1638

Code


<?php

use Xmf\Debug;
use 
Xmf\Module\Helper;


$dir basename(__DIR__);
$helper Helper::getHelper($dir);
$helper->setDebug(true);

$helper->loadLanguage('manifesto');
$helper->loadLanguage('badmanifesto'); //throws error on log because language file was not found

$helper->addLog(_MA_XMFDEMO_MANIFESTO_HI);
echo 
_MA_XMFDEMO_MANIFESTO_LOOK_AT_LOG '<br />';

echo 
'<h3>' _MA_XMFDEMO_HELPER_MODULE '</h3>';
Debug::dump($helper->getModule());
echo 
'name: ' $helper->getModule()->getVar('name') . '<br />';
echo 
'mid: ' $helper->getModule()->getVar('mid') . '<br />';
echo 
'version: ' $helper->getModule()->getVar('version') . '<br />';

echo 
'<h3>' _MA_XMFDEMO_HELPER_CONFIG '</h3>';
Debug::dump($helper->getConfig());

// does not use default since it exists
echo 'config1: ' $helper->getConfig('config1''unused default') . '<br />';
echo 
'config2: ' $helper->getConfig('config2') . '<br />';

// throws an error on log cause config3 is missing
echo 'config3: ' $helper->getConfig('config3') . '<br />';

// uses default this time
echo 'config3: ' $helper->getConfig('config3''my default') . '<br />';

echo 
'<h3>' _MA_XMFDEMO_HELPER_OTHER_MODULE '</h3>';
if (
$otherHelper Helper::getHelper('pm')) {
    
Debug::dump($otherHelper);
    
Debug::dump($otherHelper->getHandler('message'));
} else {
    
$otherHelper Helper::getHelper('system');
    
Debug::dump($otherHelper);
}

$helper->addLog(_MA_XMFDEMO_MANIFESTO_GOODBYE);


Back to the XMF Example List
Design by: XOOPS UI/UX Team