All Data Structures Namespaces Files Functions Variables
Module.php
Go to the documentation of this file.
<?php
namespace Entity;
class Module extends ModelBase
{
protected function install()
{
$dbPrefix = $this->getDbPrefix();
$result = self::$dbo->exec("CREATE TABLE IF NOT EXISTS `{$dbPrefix}module` (
`id` INTEGER(11) UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
`name` VARCHAR(128) NOT NULL,
`description` VARCHAR(255) NOT NULL,
`directory` VARCHAR(255) NOT NULL,
`active` BOOLEAN DEFAULT FALSE NOT NULL
)");
if ($result === false)
throw new \Exception(get_class().": ".self::$dbo->errorInfo()[2]);
return true;
}
public static function getActivated()
{
$fetcher = new self();
return $fetcher->selects(array("active" => true));
}
}
Entity\Module\getActivated
static getActivated()
Definition: Module.php:22
Entity
Definition: Address.php:3
Entity\Module\install
install()
Definition: Module.php:7
Entity\ModelBase
Definition: ModelBase.php:5
Entity\Module
Definition: Module.php:5