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


PHP Player::__construct方法代碼示例

本文整理匯總了PHP中Player::__construct方法的典型用法代碼示例。如果您正苦於以下問題:PHP Player::__construct方法的具體用法?PHP Player::__construct怎麽用?PHP Player::__construct使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Player的用法示例。


在下文中一共展示了Player::__construct方法的11個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: __construct

 /**
  * Constructor
  *
  * @param array $properties
  */
 public function __construct(array $properties)
 {
     // Fix slot
     if (isset($properties['player_slot'])) {
         $binary = sprintf("%08d", decbin($properties['player_slot']));
         $properties['team'] = intval(substr($binary, 0, 1));
         $properties['slot'] = intval(bindec(substr($binary, 1)));
     }
     parent::__construct($properties);
 }
開發者ID:sjaakmoes,項目名稱:dotapi2,代碼行數:15,代碼來源:Slot.php

示例2: __construct

 /**
  * __constructor method
  * @param string $name
  * @param array $params
  * */
 public function __construct($name, $params = null)
 {
     parent::__construct($name);
     if (!is_null($params)) {
         foreach ($params as $index => $param) {
             if (method_exists($this, 'set' . ucfirst($index))) {
                 $this->{'set' . ucfirst($index)}($param);
             } elseif (property_exists($this, $index)) {
                 $this->{$index} = $param;
             }
         }
     }
 }
開發者ID:varyan,項目名稱:namecpaseSystem,代碼行數:18,代碼來源:Vehicle.php

示例3: __construct

 public function __construct()
 {
     parent::__construct("Banque");
 }
開發者ID:AlexisAfonso,項目名稱:LAMP,代碼行數:4,代碼來源:card.php

示例4: __construct

 public function __construct($username, $password)
 {
     parent::__construct($username, $password);
 }
開發者ID:manishkhanchandani,項目名稱:mkgxy,代碼行數:4,代碼來源:PlayerByUsernamePassword.php

示例5: __construct

 /** public function __construct
  *		Class constructor
  *		Sets all outside data
  *
  * @param int optional player id
  * @action instantiates object
  * @return void
  */
 public function __construct($id = null)
 {
     $this->_mysql = Mysql::get_instance();
     // check and make sure we have logged into this game before
     if (0 != (int) $id) {
         $query = "\n\t\t\t\tSELECT COUNT(*)\n\t\t\t\tFROM " . self::EXTEND_TABLE . "\n\t\t\t\tWHERE player_id = '{$id}'\n\t\t\t";
         $count = (int) $this->_mysql->fetch_value($query);
         if (0 == $count) {
             throw new MyException(__METHOD__ . ': ' . GAME_NAME . ' Player (#' . $id . ') not found in database');
         }
     }
     parent::__construct($id);
 }
開發者ID:benjamw,項目名稱:pharaoh,代碼行數:21,代碼來源:gameplayer.class.php

示例6: __construct

 public function __construct($t, $f = "", $l = "")
 {
     parent::__construct($f, $l);
     $this->Team = $t;
 }
開發者ID:Britgo,項目名稱:Online-League,代碼行數:5,代碼來源:teammemb.php

示例7: __construct

 public function __construct($noOfDecks = 2)
 {
     parent::__construct('Dealer');
     $this->deck = new Deck($noOfDecks);
     $this->deck->shuffle();
 }
開發者ID:rcoops,項目名稱:blackjack,代碼行數:6,代碼來源:Dealer.php

示例8: __construct

 public function __construct($playersName)
 {
     $this->scoreVisible = true;
     $this->cardVisible = true;
     parent::__construct($playersName);
 }
開發者ID:hollandlive,項目名稱:blackjack,代碼行數:6,代碼來源:player.class.php

示例9: __construct

 public function __construct($email)
 {
     parent::__construct($email);
 }
開發者ID:manishkhanchandani,項目名稱:mkgxy,代碼行數:4,代碼來源:PlayerByEmail.php

示例10: __construct

 public function __construct($fullName = null)
 {
     parent::__construct($fullName);
 }
開發者ID:manishkhanchandani,項目名稱:mkgxy,代碼行數:4,代碼來源:PlayerByName.php

示例11: __construct

 public function __construct()
 {
     parent::__construct(0);
 }
開發者ID:delboy1978uk,項目名稱:casino,代碼行數:4,代碼來源:Banker.php


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