當前位置: 首頁>>代碼示例>>PHP>>正文


PHP db_connect::__construct方法代碼示例

本文整理匯總了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);
         }
     }
 }
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:12,代碼來源:class.gcm.inc.php

示例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);
     }
 }
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:38,代碼來源:class.photo.inc.php

示例3: __construct

 public function __construct($dbo = NULL)
 {
     parent::__construct($dbo);
 }
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:4,代碼來源:class.gift.inc.php

示例4: __construct

 public function __construct($dbo = NULL, $accountId = 0)
 {
     parent::__construct($dbo);
     $this->setId($accountId);
 }
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:5,代碼來源:class.account.inc.php

示例5: __construct

 public function __construct($dbo = NULL, $profileId = 0)
 {
     parent::__construct($dbo);
     $this->setId($profileId);
 }
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:5,代碼來源:class.profile.inc.php

示例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;
 }
開發者ID:rparrish,項目名稱:redcap-ddp,代碼行數:11,代碼來源:db_connect.php

示例7: __construct

 public function __construct($dbo = NULL, $profile_id = 0)
 {
     parent::__construct($dbo);
 }
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:4,代碼來源:class.imglib.inc.php

示例8: __construct

 public function __construct($dbo = NULL, $language = "en")
 {
     parent::__construct($dbo);
     $this->set($language);
 }
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:5,代碼來源:class.language.inc.php

示例9: __construct

 public function __construct($dbo = NULL)
 {
     $this->conn_id = @ftp_connect($this->ftp_server);
     parent::__construct($dbo);
 }
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:5,代碼來源:class.cdn.inc.php

示例10: __construct

 public function __construct($dbo = NULL)
 {
     parent::__construct($dbo);
     $this->auth_valid_sec = 7 * 24 * 3600;
     // 7 days
 }
開發者ID:JohnWilliamsMSU,項目名稱:Steady,代碼行數:6,代碼來源:class.auth.inc.php


注:本文中的db_connect::__construct方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。