ecom
E-commerce cms
Main Page
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
core
models
Cart.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Entity
;
4
5
class
Cart
extends
ModelBase
6
{
7
protected
function
install
()
8
{
9
$dbPrefix = $this->getDbPrefix();
10
$result = self::$dbo->exec(
"CREATE TABLE IF NOT EXISTS `{$dbPrefix}cart` (
11
`id` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
12
`user_id` INTEGER(11) UNSIGNED NULL,
13
`created` DATETIME NOT NULL,
14
FOREIGN KEY (`user_id`) REFERENCES `{$dbPrefix}user`(id)
15
)"
);
16
if
($result ===
false
)
17
throw
new \Exception(get_class().
": "
.self::$dbo->errorInfo()[2]);
18
return
true
;
19
}
20
}
21
Entity\Cart
Definition:
Cart.php:5
Entity
Definition:
Address.php:3
Entity\Cart\install
install()
Definition:
Cart.php:7
Entity\ModelBase
Definition:
ModelBase.php:5
Generated on Wed Aug 12 2015 21:31:31 for ecom by
1.8.8