Adding some more PHP Doc comments.
This commit is contained in:
parent
c682ccef69
commit
3b1513f791
@ -41,9 +41,15 @@ class Querylet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class TagQuerylet {
|
class TagQuerylet {
|
||||||
var $tag;
|
/** @var string */
|
||||||
var $positive;
|
public $tag;
|
||||||
|
/** @var bool */
|
||||||
|
public $positive;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param string $tag
|
||||||
|
* @param bool $positive
|
||||||
|
*/
|
||||||
public function __construct($tag, $positive) {
|
public function __construct($tag, $positive) {
|
||||||
$this->tag = $tag;
|
$this->tag = $tag;
|
||||||
$this->positive = $positive;
|
$this->positive = $positive;
|
||||||
@ -51,9 +57,15 @@ class TagQuerylet {
|
|||||||
}
|
}
|
||||||
|
|
||||||
class ImgQuerylet {
|
class ImgQuerylet {
|
||||||
var $qlet;
|
/** @var \Querylet */
|
||||||
var $positive;
|
public $qlet;
|
||||||
|
/** @var bool */
|
||||||
|
public $positive;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \Querylet $qlet
|
||||||
|
* @param bool $positive
|
||||||
|
*/
|
||||||
public function __construct($qlet, $positive) {
|
public function __construct($qlet, $positive) {
|
||||||
$this->qlet = $qlet;
|
$this->qlet = $qlet;
|
||||||
$this->positive = $positive;
|
$this->positive = $positive;
|
||||||
@ -65,6 +77,9 @@ class DBEngine {
|
|||||||
/** @var null|string */
|
/** @var null|string */
|
||||||
public $name = null;
|
public $name = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \PDO $db
|
||||||
|
*/
|
||||||
public function init($db) {}
|
public function init($db) {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,6 +103,9 @@ class MySQL extends DBEngine {
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
public $name = "mysql";
|
public $name = "mysql";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \PDO $db
|
||||||
|
*/
|
||||||
public function init($db) {
|
public function init($db) {
|
||||||
$db->exec("SET NAMES utf8;");
|
$db->exec("SET NAMES utf8;");
|
||||||
}
|
}
|
||||||
@ -124,6 +142,9 @@ class PostgreSQL extends DBEngine {
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
public $name = "pgsql";
|
public $name = "pgsql";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \PDO $db
|
||||||
|
*/
|
||||||
public function init($db) {
|
public function init($db) {
|
||||||
$db->exec("SET application_name TO 'shimmie [{$_SERVER['REMOTE_ADDR']}]';");
|
$db->exec("SET application_name TO 'shimmie [{$_SERVER['REMOTE_ADDR']}]';");
|
||||||
}
|
}
|
||||||
@ -173,6 +194,9 @@ class SQLite extends DBEngine {
|
|||||||
/** @var string */
|
/** @var string */
|
||||||
public $name = "sqlite";
|
public $name = "sqlite";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param \PDO $db
|
||||||
|
*/
|
||||||
public function init($db) {
|
public function init($db) {
|
||||||
ini_set('sqlite.assoc_case', 0);
|
ini_set('sqlite.assoc_case', 0);
|
||||||
$db->exec("PRAGMA foreign_keys = ON;");
|
$db->exec("PRAGMA foreign_keys = ON;");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user