/** * 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); }
/** * __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; } } } }
public function __construct() { parent::__construct("Banque"); }
public function __construct($username, $password) { parent::__construct($username, $password); }
/** 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); }
public function __construct($t, $f = "", $l = "") { parent::__construct($f, $l); $this->Team = $t; }
public function __construct($noOfDecks = 2) { parent::__construct('Dealer'); $this->deck = new Deck($noOfDecks); $this->deck->shuffle(); }
public function __construct($playersName) { $this->scoreVisible = true; $this->cardVisible = true; parent::__construct($playersName); }
public function __construct($email) { parent::__construct($email); }
public function __construct($fullName = null) { parent::__construct($fullName); }
public function __construct() { parent::__construct(0); }