= $user; } public function login($password) { if ($this->_user->isValid($password)) { return [ "role" => "default", "expire" => 3600 ]; } throw new AuthenticatorException("authentication_error"); } } Acesso ao banco de dados 21
connect() { $this->_db = new SQLite3(":memory:"); } public function query($query) { $this->_query = $this->_db->query($query); } public function execute() { return $this->_query->fetchArray(); } }