ecom
E-commerce cms
 All Data Structures Namespaces Files Functions Variables
Static Public Member Functions | Protected Member Functions
ModuleHook Class Reference
Inheritance diagram for ModuleHook:
ModelBase

Static Public Member Functions

static getModules ($moduleIds)
 
- Static Public Member Functions inherited from ModelBase
static init ($config=null)
 
static getDbPrefix ()
 
static setup ()
 

Protected Member Functions

 install ()
 
- Protected Member Functions inherited from ModelBase
 install ()
 

Additional Inherited Members

- Public Member Functions inherited from ModelBase
 __construct ($id=null)
 
 getTableName ()
 
 getMeta ($lang=null)
 
 __get ($key)
 
 __set ($key, $value)
 
 save ()
 
 delete ()
 
 selects ($criteria=null, $orderBy=null)
 
 selectById ($id)
 
- Static Protected Attributes inherited from ModelBase
static $dbo = null
 

Detailed Description

Definition at line 5 of file ModuleHook.php.

Member Function Documentation

static getModules (   $moduleIds)
static

Definition at line 23 of file ModuleHook.php.

24  {
25  $fetcher = new self();
26  return $fetcher->selects(array("module_id" => $moduleIds), array("hookName", "hookPosition"));
27  }
install ( )
protected

Definition at line 7 of file ModuleHook.php.

8  {
9  $dbPrefix = $this->getDbPrefix();
10  $result = self::$dbo->exec("CREATE TABLE IF NOT EXISTS `{$dbPrefix}modulehook` (
11  `id` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
12  `module_id` INTEGER(11) UNSIGNED NOT NULL,
13  `hookName` VARCHAR(32) NOT NULL,
14  `hookPosition` INTEGER(11) NOT NULL,
15  FOREIGN KEY (`module_id`) REFERENCES `{$dbPrefix}module`(id),
16  UNIQUE(`module_id`, `hookName`)
17  )");
18  if ($result === false)
19  throw new \Exception(get_class().": ".self::$dbo->errorInfo()[2]);
20  return true;
21  }
static getDbPrefix()
Definition: ModelBase.php:42

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