本文整理汇总了PHP中SQL::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP SQL::__construct方法的具体用法?PHP SQL::__construct怎么用?PHP SQL::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类SQL
的用法示例。
在下文中一共展示了SQL::__construct方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($siteId = false)
{
//TODO: make tables prefixes
if (empty($this->primaryKey)) {
$this->primaryKey = str_replace("cody_", "", $this->table) . "_id";
}
$db = DB::get();
parent::__construct($this->table, $db);
if ($siteId !== false) {
$this->siteId = intval($siteId);
$this->accountId = Site::accountId($siteId);
} else {
$this->siteId = Site::id();
$this->accountId = Site::accountId();
}
if ($this->useSiteId) {
$this->whereBy('site_id', $this->siteId);
}
if ($this->useAccountId) {
$this->whereBy('account_id', $this->accountId);
}
}
示例2: __construct
public function __construct(array $values)
{
parent::__construct(null, $values);
}
示例3:
/**
* Initialize a new instance of SQLite Connection
*
* @param string $path path to db file
* @param string $password database users password
*
* @return SQLite
*/
function __construct($path, $password = '')
{
if (!class_exists('SQLite3')) {
throw new \RuntimeException('SQLite3 Class not found. Details at http://php.net/manual/de/book.sqlite3.php');
}
parent::__construct();
$this->path = $path;
$this->password = $password;
}
示例4:
function __construct()
{
parent::__construct();
}
示例5: __construct
/**
* @param string $column
* @param string $content
* @param array $parameters
*/
public function __construct($column, $content, array $parameters = array())
{
$this->column = $column;
parent::__construct($content, $parameters);
}
示例6: __construct
/**
* @param integer $value
*/
public function __construct($value)
{
parent::__construct((string) (int) $value);
}
示例7: __construct
public function __construct($bDefaultLogic = true, array &$arrRawSql = null)
{
$this->setDefaultLogic($bDefaultLogic);
parent::__construct($arrRawSql);
}