ecom
E-commerce cms
 All Data Structures Namespaces Files Functions Variables Pages
Public Member Functions | Static Public Member Functions | Private Attributes
AModule Class Reference
Inheritance diagram for AModule:
Test2Module TestModule

Public Member Functions

 install ()
 
 uninstall ()
 
 doAction ($event)
 
 doShortCode ($shortCode, $params)
 
 setContext ($context)
 
 setEntity ($entity)
 
 __get ($key)
 

Static Public Member Functions

static registerHook ($hookName)
 

Private Attributes

 $context
 
 $entity
 

Detailed Description

Module superclass Contains all informations about the module

Definition at line 9 of file AModule.php.

Member Function Documentation

__get (   $key)

Getter

Definition at line 86 of file AModule.php.

87  {
88  switch ($key)
89  {
90  case "context": return $this->context; break;
91  case "entity": return $this->entity; break;
92  }
93  throw new \Exception("Cannot access attribute {$key}");
94  }
doAction (   $event)
abstract
Parameters
\Tools\HookEvent$eventcalled hook /core/tools/HookEvent.php Called on hook reception
doShortCode (   $shortCode,
  $params 
)
abstract
Parameters
string$shortCode
array( key => value ) shortcode's parameters Called on shortcode reception
install ( )
abstract

Called on module install Should register shortcodes and Hooks

static registerHook (   $hookName)
static

Register hook to be triggered Can only be triggered while module setup

Definition at line 78 of file AModule.php.

79  {
80  $this->context->hooks->register($this, $hookname);
81  }
setContext (   $context)
Parameters
\Tools\Context$context/core/tools/Context.php set the application context Will work only one time

Definition at line 56 of file AModule.php.

57  {
58  if ($this->context === null)
59  $this->context = $context;
60  }
setEntity (   $entity)
Parameters
\Entity\Module$module/core/models/Module.php set the module database object Will work only one time

Definition at line 68 of file AModule.php.

69  {
70  if ($this->entity === null)
71  $this->entity = $entity;
72  }
uninstall ( )

Called on module unsinstall

Definition at line 33 of file AModule.php.

34  { }

Field Documentation

Tools Context $context
private

/core/tools/Context.php Website context Can be accessed read-only

Definition at line 17 of file AModule.php.

$entity
private

Definition at line 22 of file AModule.php.


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