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