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
Product.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Entity
;
4
5
class
Product
extends
ModelBase
6
{
7
protected
function
install
()
8
{
9
$dbPrefix = $this->getDbPrefix();
10
$result = self::$dbo->exec(
"CREATE TABLE IF NOT EXISTS `{$dbPrefix}product` (
11
`id` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
12
`parent` INTEGER(11) UNSIGNED NULL,
13
`shurl` VARCHAR(255) NOT NULL,
14
`priceExcl` FLOAT NULL,
15
`priceIncl` FLOAT NULL,
16
`ean` VARCHAR(64) NULL,
17
FOREIGN KEY (`parent`) REFERENCES `{$dbPrefix}product`(id)
18
)"
);
19
if
($result ===
false
)
20
throw
new \Exception(get_class().
": "
.self::$dbo->errorInfo()[2]);
21
return
true
;
22
}
23
}
24
Entity\Product\install
install()
Definition:
Product.php:7
Entity
Definition:
Address.php:3
Entity\Product
Definition:
Product.php:5
Entity\ModelBase
Definition:
ModelBase.php:5
Generated on Tue Aug 4 2015 00:33:19 for ecom by
1.8.8