ecom
E-commerce cms
 All Data Structures Namespaces Files Functions Variables
Cms.php
Go to the documentation of this file.
1 <?php
2 
3 namespace Entity;
4 
5 class Cms extends ModelBase
6 {
7  protected function install()
8  {
9  $dbPrefix = $this->getDbPrefix();
10  $result = self::$dbo->exec("CREATE TABLE IF NOT EXISTS `{$dbPrefix}cms` (
11  `id` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
12  `shurl` VARCHAR(255) NOT NULL,
13  `controller` VARCHAR(255) NOT NULL,
14  `order` INTEGER UNSIGNED NOT NULL DEFAULT 0,
15  UNIQUE(`shurl`)
16  )");
17  if ($result === false)
18  throw new \Exception(get_class().": ".self::$dbo->errorInfo()[2]);
19  return true;
20  }
21 }
22 
install()
Definition: Cms.php:7