本文整理汇总了PHP中db_connect::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP db_connect::__construct方法的具体用法?PHP db_connect::__construct怎么用?PHP db_connect::__construct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类db_connect
的用法示例。
在下文中一共展示了db_connect::__construct方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
public function __construct($dbo = NULL, $accountId = 0)
{
parent::__construct($dbo);
$this->accountId = $accountId;
if ($this->accountId != 0) {
$account = new account($this->db, $this->accountId);
$deviceId = $account->getGCM_regId();
if (strlen($deviceId) != 0) {
$this->addDeviceId($deviceId);
}
}
}
示例2: __construct
public function __construct($dbo = NULL, $imgFilename, $photoSize = 160)
{
parent::__construct($dbo);
$this->imgFilename = $imgFilename;
$this->photoSize = $photoSize;
$this->initialfilesize = filesize($imgFilename);
$this->imageproperties = getimagesize($imgFilename);
$this->mimetype = image_type_to_mime_type($this->imageproperties[2]);
if ($this->imageproperties[2] === IMAGETYPE_JPEG) {
$this->imgData = imagecreatefromjpeg($this->imgFilename);
} else {
$this->imgData = imagecreatefrompng($this->imgFilename);
}
$srcW = $this->imageproperties[0];
$srcH = $this->imageproperties[1];
if ($srcW > $this->photoSize || $srcH > $this->photoSize) {
if ($srcW < $srcH) {
$koe = $srcW / $this->photoSize;
$destW = $this->photoSize;
$destH = ceil($srcH / $koe);
$src_x = $destW / 2 - $this->photoSize / 2;
$src_y = 0;
} else {
$koe = $srcH / $this->photoSize;
$destH = $this->photoSize;
$destW = ceil($srcW / $koe);
$src_x = $destW / 2 - $this->photoSize / 2;
$src_y = 0;
}
$copy = imagecreatetruecolor($destW, $destH);
imagecopyresampled($copy, $this->imgData, 0, 0, 0, 0, $destW, $destH, imagesx($this->imgData), imagesy($this->imgData));
imagedestroy($this->imgData);
imageconvolution($copy, array(array(-1, -1, -1), array(-1, 16, -1), array(-1, -1, -1)), 8, 0);
$this->imgData = imagecreatetruecolor($this->photoSize, $this->photoSize);
imagecopy($this->imgData, $copy, 0, 0, $src_x, $src_y, $this->photoSize, $this->photoSize);
imagedestroy($copy);
}
}
示例3: __construct
public function __construct($dbo = NULL)
{
parent::__construct($dbo);
}
示例4: __construct
public function __construct($dbo = NULL, $accountId = 0)
{
parent::__construct($dbo);
$this->setId($accountId);
}
示例5: __construct
public function __construct($dbo = NULL, $profileId = 0)
{
parent::__construct($dbo);
$this->setId($profileId);
}
示例6: __construct
/**
* Passes arguments to the parent constructor and immediately
* initializes a connection
*
*/
public function __construct($source = "ARCH")
{
parent::__construct("ARCH");
$this->database_connection = $this->connect($source);
return $this->database_connection;
}
示例7: __construct
public function __construct($dbo = NULL, $profile_id = 0)
{
parent::__construct($dbo);
}
示例8: __construct
public function __construct($dbo = NULL, $language = "en")
{
parent::__construct($dbo);
$this->set($language);
}
示例9: __construct
public function __construct($dbo = NULL)
{
$this->conn_id = @ftp_connect($this->ftp_server);
parent::__construct($dbo);
}
示例10: __construct
public function __construct($dbo = NULL)
{
parent::__construct($dbo);
$this->auth_valid_sec = 7 * 24 * 3600;
// 7 days
}