public function __construct($_con) { $this->con = $_con; $this->db = new DBase($this); $this->user = new User($this->db, $this->con->resourceId); $this->send(Messaging::request('user', 'authentication', ['token' => $this->user->getToken()])); }
public function __construct($client) { $this->_monster = new Egg(); $this->_client = $client; $this->_db = new DBase($this); echo "Game created - client id: " . $this->_client->resourceId . "\nSending request for authentication\n"; $token = $this->generateToken(); if (!empty($token)) { $this->sendMessage(Messaging::request('authentication', 'login', array('id' => $this->_client->resourceId, 'token' => $token))); } }