XCL Web Application Platform 2.5.0
The XoopsCube Legacy Project
Loading...
Searching...
No Matches
Legacy_AbstractModule Class Reference

[Abstract] Represents modules and used for Legacy_Controller More...

Inheritance diagram for Legacy_AbstractModule:
Legacy_ModuleAdapter LegacyRender_Module Legacy_Module Message_Module Profile_Module User_Module

Public Member Functions

 __construct (&$module, $loadConfig=true)
 constructor
 
 setAttribute ($key, $value)
 Sets $value with $key to attributes.
 
 hasAttribute ($key)
 Gets a value indicating whether the value specified by $key exists.
 
 getAttribute ($key)
 Gets a value of attributes with $key.
 
 setXoopsModule (&$xoopsModule)
 Binds an instance of XoopsModule to the property.
 
getXoopsModule ()
 Gets the binded XoopsModule instance.
 
 setModuleConfig ($config)
 Binds array of xoops module config to the property.
 
 getModuleConfig (string $key=null)
 Gets a value form xoops module config with $key.
 
getCacheInfo ()
 Gets the cache information instance.
 
 _createCacheInfo ()
 Creates a cache information instance and returns it.
 
getRenderTarget ()
 Gets the render target instance.
 
 _createRenderTarget ()
 Creates a render target instance and returns it.
 
 getRenderSystemName ()
 Gets a name of the dependency render system.
 
getRenderSystem ()
 Gets the dependency render system.
 
 isActive ()
 Gets a value indicating whether this modules is an active.
 
 isEnableCache ()
 Gets a value indicating whether the current module has a option of configurations to use the cache system.
 
createCacheInfo ()
 Initializes a cache information object, and returns it.
 
 startup ()
 [Abstract] This method is called by the controller strategy, if this module is the current module.
 
 doActionSearch (&$searchArgs)
 [Abstract] This method is called back by the action search feature in the control panel.
 
 doLegacyGlobalSearch ($queries, $andor, $max_hit, $start, $uid)
 This method is called back by the xoops global search feature.
 
 hasAdminIndex ()
 Gets a value indicating whether this module has the page controller in the control panel side.
 
 getAdminIndex ()
 [Abstract] Gets an absolute URL indicating the top page of this module for the control panel side.
 
 getAdminMenu ()
 Gets an array having menus for the side menu of the control panel.
 

Data Fields

 $mAttributes = []
 [READ ONLY] Map Array - std::map<string, mixed> - used freely for this module.
 
 $mXoopsModule = null
 [READ ONLY] XoopsModule
 
 $mModuleConfig = []
 [READ ONLY] Map Array - std::map<string, string>
 
 $mCacheInfo = null
 Legacy_AbstractCacheInformation - The cached instance.
 
 $mRender = null
 XCube_RenderTarget - The render target instance for this module.
 

Detailed Description

[Abstract] Represents modules and used for Legacy_Controller

This is an abstract class which has interfaces to connect with the controller about the module process. Legacy controller makes an interface of this class and uses its methods to call module programs.

So modules may define their sub-classes implementing this interface. The instance is attached to the Legacy_Context after initializing, so modules can define members for module's features and can access them. But, most interfaces defined by this class should be called by only Legacy_Controller.

Attention
These interfaces are initialized by only Legacy_Controller.
See also
Legacy_Utils\createModule()
XoopsModule

Definition at line 31 of file Legacy_Module.class.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( & $module,
$loadConfig = true )

constructor

Parameters
XoopsModule$module
bool$loadConfig
Attention
Basically, only Legacy_Controller and its utility functions should call the constructor.

Definition at line 76 of file Legacy_Module.class.php.

Member Function Documentation

◆ _createCacheInfo()

_createCacheInfo ( )

Creates a cache information instance and returns it.

Returns
void
Remarks
This member function sets the created instance to mCacheInfo because this instance has to keep the instance for many callbacks.
See also
getCacheInfo()

Definition at line 194 of file Legacy_Module.class.php.

◆ _createRenderTarget()

_createRenderTarget ( )

Creates a render target instance and returns it.

Returns
void
Remarks
This member function sets the created instance to mRender because this instance has to keep the instance for many callbacks.
See also
getRenderTarget()

Definition at line 225 of file Legacy_Module.class.php.

◆ createCacheInfo()

& createCacheInfo ( )

Initializes a cache information object, and returns it.

Returns
Legacy_ModuleCacheInformation

Definition at line 302 of file Legacy_Module.class.php.

◆ doActionSearch()

doActionSearch ( & $searchArgs)

[Abstract] This method is called back by the action search feature in the control panel.

Parameters
Legacy_ActionSearchArgs$searchArgs
Returns
void
See also
Legacy_ActionSearchArgs

Reimplemented in Legacy_ModuleAdapter.

Definition at line 329 of file Legacy_Module.class.php.

◆ doLegacyGlobalSearch()

doLegacyGlobalSearch ( $queries,
$andor,
$max_hit,
$start,
$uid )

This method is called back by the xoops global search feature.

Parameters
$queries
$andor
$max_hit
$start
$uid

Reimplemented in Legacy_ModuleAdapter.

Definition at line 342 of file Legacy_Module.class.php.

◆ getAdminIndex()

getAdminIndex ( )

[Abstract] Gets an absolute URL indicating the top page of this module for the control panel side.

Returns
string
Attention
Controller fetches the list of modules from DB before. So, 'override' may not be able to change the process.

Reimplemented in Legacy_ModuleAdapter, and Message_Module.

Definition at line 372 of file Legacy_Module.class.php.

◆ getAdminMenu()

getAdminMenu ( )

Gets an array having menus for the side menu of the control panel.

Returns
void Array
See also
/modules/legacy/admin/templates/blocks/legacy_admin_block_sidemenu.html

Reimplemented in Legacy_Module, Legacy_ModuleAdapter, LegacyRender_Module, Message_Module, and User_Module.

Definition at line 383 of file Legacy_Module.class.php.

◆ getAttribute()

getAttribute ( $key)

Gets a value of attributes with $key.

Parameters
string$key
Returns
mixed - If the value specified by $key doesn't exist in attributes, returns null.

Definition at line 118 of file Legacy_Module.class.php.

◆ getCacheInfo()

& getCacheInfo ( )

Gets the cache information instance.

Returns
Legacy_ModuleCacheInformation
See also
_createChaceInfo()

Definition at line 176 of file Legacy_Module.class.php.

◆ getModuleConfig()

getModuleConfig ( string $key = null)

Gets a value form xoops module config with $key.

Parameters
string | null$key
Returns
mixed If $key is specified null, returns map array (std::map<string, mixed>)

Definition at line 161 of file Legacy_Module.class.php.

◆ getRenderSystem()

& getRenderSystem ( )

Gets the dependency render system.

Returns
XCube_RenderSystem
Remarks
If this module uses the unregistered render system is used, override this.

Definition at line 257 of file Legacy_Module.class.php.

◆ getRenderSystemName()

getRenderSystemName ( )

Gets a name of the dependency render system.

Returns
string
Remarks
If this module depends on other systems than the main render system by Legacy, override this.
See also
getRenderSystem()

Definition at line 244 of file Legacy_Module.class.php.

◆ getRenderTarget()

& getRenderTarget ( )

Gets the render target instance.

Returns
XCube_RenderTarget
See also
_createRenderTarget()

Definition at line 207 of file Legacy_Module.class.php.

◆ getXoopsModule()

& getXoopsModule ( )

Gets the binded XoopsModule instance.

Returns
XoopsModule

Definition at line 139 of file Legacy_Module.class.php.

◆ hasAdminIndex()

hasAdminIndex ( )

Gets a value indicating whether this module has the page controller in the control panel side.

Returns
bool
Note
Side menu blocks may not display the admin menu if this member function returns false.
Attention
Controller fetches the list of modules from DB before. So, 'override' may not be able to change the process.

Reimplemented in Legacy_ModuleAdapter, and Message_Module.

Definition at line 358 of file Legacy_Module.class.php.

◆ hasAttribute()

hasAttribute ( $key)

Gets a value indicating whether the value specified by $key exists.

Parameters
string$key
Returns
bool

Definition at line 107 of file Legacy_Module.class.php.

◆ isActive()

isActive ( )

Gets a value indicating whether this modules is an active.

Returns
bool

Definition at line 270 of file Legacy_Module.class.php.

◆ isEnableCache()

isEnableCache ( )

Gets a value indicating whether the current module has a option of configurations to use the cache system.

Returns
bool

Definition at line 286 of file Legacy_Module.class.php.

◆ setAttribute()

setAttribute ( $key,
$value )

Sets $value with $key to attributes.

Parameters
string$key
mixed$value
Returns
void
Remarks
If references are must, access directly to $mAttributes. Because PHP4 can't handle reference in the signature of this member function.

Definition at line 96 of file Legacy_Module.class.php.

◆ setModuleConfig()

setModuleConfig ( $config)

Binds array of xoops module config to the property.

Parameters
$configArray - std::map<string, mixed>
Returns
void

Definition at line 150 of file Legacy_Module.class.php.

◆ setXoopsModule()

setXoopsModule ( & $xoopsModule)

Binds an instance of XoopsModule to the property.

Parameters
XoopsModule$xoopsModule
Returns
void

Definition at line 129 of file Legacy_Module.class.php.

◆ startup()

startup ( )

[Abstract] This method is called by the controller strategy, if this module is the current module.

Returns
void

Reimplemented in Profile_Module.

Definition at line 317 of file Legacy_Module.class.php.

Field Documentation

◆ $mAttributes

$mAttributes = []

[READ ONLY] Map Array - std::map<string, mixed> - used freely for this module.

Remarks
If references are must, access directly to this member.

Definition at line 39 of file Legacy_Module.class.php.

◆ $mCacheInfo

$mCacheInfo = null

Legacy_AbstractCacheInformation - The cached instance.

See also
getCacheInfo()

Definition at line 58 of file Legacy_Module.class.php.

◆ $mModuleConfig

$mModuleConfig = []

[READ ONLY] Map Array - std::map<string, string>

Definition at line 51 of file Legacy_Module.class.php.

◆ $mRender

$mRender = null

XCube_RenderTarget - The render target instance for this module.

See also
getRenderTarget()

Definition at line 65 of file Legacy_Module.class.php.

◆ $mXoopsModule

$mXoopsModule = null

[READ ONLY] XoopsModule

Definition at line 45 of file Legacy_Module.class.php.


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