当前位置: 首页>>代码示例>>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;未经允许,请勿转载。