XOOPS  2.6.0
Xmf\Module\Helper\GenericHelper Class Reference

Public Member Functions

 addLog ($log)
 
 getConfig ($name)
 
 getHandler ($name)
 
 getModule ()
 
 isCurrentModule ()
 
 isUserAdmin ()
 
 loadLanguage ($name)
 
 path ($path= '')
 
 redirect ($url, $time=3, $message= '')
 
 setDebug ($bool=true)
 
 url ($url= '')
 

Static Public Member Functions

static getInstance ($dirname= 'notsetyet')
 

Protected Attributes

 $configs
 
 $debug
 
 $dirname
 
 $object
 

Private Member Functions

 __construct ($dirname)
 
 _initConfig ()
 
 _initHandler ($name)
 
 _initObject ()
 

Private Attributes

 $_handlers
 

Detailed Description

Definition at line 31 of file GenericHelper.php.

Constructor & Destructor Documentation

Xmf\Module\Helper\GenericHelper::__construct (   $dirname)
private

class constuctor

Parameters
string$dirnamea module directory name

Definition at line 63 of file GenericHelper.php.

References Xmf\Module\Helper\GenericHelper\$dirname.

Member Function Documentation

Xmf\Module\Helper\GenericHelper::_initConfig ( )
private

get module configs

Returns
void

Definition at line 185 of file GenericHelper.php.

References $config_handler, Xmf\Module\Helper\GenericHelper\$dirname, $xoopsModule, $xoopsModuleConfig, Xmf\Module\Helper\GenericHelper\addLog(), and Xmf\Module\Helper\GenericHelper\getModule().

Referenced by Xmf\Module\Helper\GenericHelper\getConfig().

Here is the call graph for this function:

Here is the caller graph for this function:

Xmf\Module\Helper\GenericHelper::_initHandler (   $name)
private

get a handler instance and store in $this->_handlers

Parameters
string$namename of handler to load
Returns
void

Definition at line 210 of file GenericHelper.php.

References $name, Xmf\Module\Helper\GenericHelper\addLog(), XoopsBaseConfig\get(), and Xoops\Core\Database\Factory\getConnection().

Referenced by Xmf\Module\Helper\GenericHelper\getHandler().

Here is the call graph for this function:

Here is the caller graph for this function:

Xmf\Module\Helper\GenericHelper::_initObject ( )
private

get a module object

Returns
void

Definition at line 165 of file GenericHelper.php.

References Xmf\Module\Helper\GenericHelper\$dirname, $module_handler, $xoopsModule, Xmf\Module\Helper\GenericHelper\addLog(), and xoops_getHandler().

Referenced by Xmf\Module\Helper\GenericHelper\getModule().

Here is the call graph for this function:

Here is the caller graph for this function:

Xmf\Module\Helper\GenericHelper::addLog (   $log)
Xmf\Module\Helper\GenericHelper::getConfig (   $name)

get a module config item

Parameters
string$namename of config item, or blank for all items
Returns
mixed string config item, array of config items, or null if config not found

Definition at line 112 of file GenericHelper.php.

References Xmf\Module\Helper\GenericHelper\$configs, $name, Xmf\Module\Helper\GenericHelper\_initConfig(), and Xmf\Module\Helper\GenericHelper\addLog().

Here is the call graph for this function:

Xmf\Module\Helper\GenericHelper::getHandler (   $name)

Get an Object Handler

Parameters
string$namename of handler to load
Returns
bool|XoopsObjectHandler|XoopsPersistableObjectHandler

Definition at line 142 of file GenericHelper.php.

References $name, Xmf\Module\Helper\GenericHelper\_initHandler(), and Xmf\Module\Helper\GenericHelper\addLog().

Here is the call graph for this function:

static Xmf\Module\Helper\GenericHelper::getInstance (   $dirname = 'notsetyet')
static

Return instance of module Xmf for dirname

Parameters
string$dirnamemodule directory name
Returns
Xmf

Definition at line 75 of file GenericHelper.php.

References Xmf\Module\Helper\GenericHelper\$dirname.

Referenced by Xmf\Module\Helper\getHelper().

Here is the caller graph for this function:

Xmf\Module\Helper\GenericHelper::getModule ( )

get the module object

Returns
XoopsModule

Definition at line 92 of file GenericHelper.php.

References Xmf\Module\Helper\GenericHelper\$object, Xmf\Module\Helper\GenericHelper\_initObject(), and Xmf\Module\Helper\GenericHelper\addLog().

Referenced by Xmf\Module\Helper\GenericHelper\_initConfig(), and Xmf\Module\Helper\GenericHelper\isUserAdmin().

Here is the call graph for this function:

Here is the caller graph for this function:

Xmf\Module\Helper\GenericHelper::isCurrentModule ( )

Is this the currently active module?

Returns
bool

Definition at line 287 of file GenericHelper.php.

References $GLOBALS.

Xmf\Module\Helper\GenericHelper::isUserAdmin ( )

Does user have admin rights to this module?

Returns
bool true is user has admin right, else false

Definition at line 301 of file GenericHelper.php.

References $GLOBALS, and Xmf\Module\Helper\GenericHelper\getModule().

Here is the call graph for this function:

Xmf\Module\Helper\GenericHelper::loadLanguage (   $name)

load a language file for this module

Parameters
string$namebasename of language file (i.e. 'admin')
Returns
bool

Definition at line 239 of file GenericHelper.php.

References $name, Xmf\Module\Helper\GenericHelper\addLog(), and Xmf\Language\load().

Here is the call graph for this function:

Xmf\Module\Helper\GenericHelper::path (   $path = '')

Return absolute filesystem path for a module relative path

Parameters
string$pathmodule relative file system path
Returns
string

Definition at line 325 of file GenericHelper.php.

References $path.

Xmf\Module\Helper\GenericHelper::redirect (   $url,
  $time = 3,
  $message = '' 
)

Redirect the user to a page within this module

Parameters
string$urlmodule relative url (i.e. index.php)
int$timetime in seconds to show redirect message
string$messageredirect message
Returns
void

Definition at line 339 of file GenericHelper.php.

References $url, exit, redirect_header(), and Xmf\Module\Helper\GenericHelper\url().

Here is the call graph for this function:

Xmf\Module\Helper\GenericHelper::setDebug (   $bool = true)

Set debug option on or off

Parameters
bool$booltrue to turn on debug logging, false for off
Returns
void

Definition at line 257 of file GenericHelper.php.

Xmf\Module\Helper\GenericHelper::url (   $url = '')

Return absolute URL for a module relative URL

Parameters
string$urlmodule relative URL
Returns
string

Definition at line 313 of file GenericHelper.php.

References $url.

Referenced by Xmf\Module\Helper\GenericHelper\redirect().

Here is the caller graph for this function:

Member Data Documentation

Xmf\Module\Helper\GenericHelper::$_handlers
private

Definition at line 46 of file GenericHelper.php.

Xmf\Module\Helper\GenericHelper::$configs
protected

Definition at line 51 of file GenericHelper.php.

Referenced by Xmf\Module\Helper\GenericHelper\getConfig().

Xmf\Module\Helper\GenericHelper::$debug
protected

Definition at line 56 of file GenericHelper.php.

Xmf\Module\Helper\GenericHelper::$object
protected

Definition at line 41 of file GenericHelper.php.

Referenced by Xmf\Module\Helper\GenericHelper\getModule().


The documentation for this class was generated from the following file: