* Project name: Battles-Game */ class u { private $user_id; /** * u constructor. * @param $playerId */ public function __construct($playerId) { if (!$this->user_id) { $this->user_id = db::c()->query('SELECT * FROM `users` WHERE `id` = ?i',$playerId)->fetch_assoc(); } } /** * @return array */ public function i() { return $this->user_id; } }