コード例 #1
0
ファイル: Slot.php プロジェクト: sjaakmoes/dotapi2
 /**
  * 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);
 }
コード例 #2
0
ファイル: Vehicle.php プロジェクト: varyan/namecpaseSystem
 /**
  * __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;
             }
         }
     }
 }
コード例 #3
0
ファイル: card.php プロジェクト: AlexisAfonso/LAMP
 public function __construct()
 {
     parent::__construct("Banque");
 }
コード例 #4
0
 public function __construct($username, $password)
 {
     parent::__construct($username, $password);
 }
コード例 #5
0
ファイル: gameplayer.class.php プロジェクト: benjamw/pharaoh
 /** 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);
 }
コード例 #6
0
ファイル: teammemb.php プロジェクト: Britgo/Online-League
 public function __construct($t, $f = "", $l = "")
 {
     parent::__construct($f, $l);
     $this->Team = $t;
 }
コード例 #7
0
ファイル: Dealer.php プロジェクト: rcoops/blackjack
 public function __construct($noOfDecks = 2)
 {
     parent::__construct('Dealer');
     $this->deck = new Deck($noOfDecks);
     $this->deck->shuffle();
 }
コード例 #8
0
 public function __construct($playersName)
 {
     $this->scoreVisible = true;
     $this->cardVisible = true;
     parent::__construct($playersName);
 }
コード例 #9
0
 public function __construct($email)
 {
     parent::__construct($email);
 }
コード例 #10
0
 public function __construct($fullName = null)
 {
     parent::__construct($fullName);
 }
コード例 #11
0
ファイル: Banker.php プロジェクト: delboy1978uk/casino
 public function __construct()
 {
     parent::__construct(0);
 }