ecom
E-commerce cms
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Pages
home
isundil
Project
ecom
core
models
ModuleHook.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Entity
;
4
5
class
ModuleHook
extends
ModelBase
6
{
7
protected
function
install
()
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
}
22
23
public
static
function
getModules
($moduleIds)
24
{
25
$fetcher =
new
self
();
26
return
$fetcher->selects(array(
"module_id"
=> $moduleIds), array(
"hookName"
,
"hookPosition"
));
27
}
28
}
29
Entity\ModuleHook
Definition:
ModuleHook.php:5
Entity\ModuleHook\getModules
static getModules($moduleIds)
Definition:
ModuleHook.php:23
Entity
Definition:
Address.php:3
Entity\ModuleHook\install
install()
Definition:
ModuleHook.php:7
Entity\ModelBase
Definition:
ModelBase.php:5
Generated on Tue Aug 4 2015 00:33:19 for ecom by
1.8.8