Request['id']); $client = $this->getModule('client')->getClientById($clientid); $allowedClients = $this->getModule('bconsole')->bconsoleCommand($this->director, array('.client'), $this->user); if ($allowedClients->exitcode === 0) { if(!is_null($client) && in_array($client->name, $allowedClients->output)) { $this->output = $client; $this->error = ClientError::ERROR_NO_ERRORS; } else { $this->output = ClientError::MSG_ERROR_CLIENT_DOES_NOT_EXISTS; $this->error =ClientError::ERROR_CLIENT_DOES_NOT_EXISTS; } } else { $this->output = $allowedClients->output; $this->error = $allowedClients->exitcode; } } public function set($id, $params) { $result = ($this->user === null) ? $this->getModule('client')->setClient($id, $params) : true; if($result === true) { $this->output = null; $this->error = ClientError::ERROR_NO_ERRORS; } else { $this->output = DatabaseError::MSG_ERROR_WRITE_TO_DB_PROBLEM; $this->error = DatabaseError::ERROR_WRITE_TO_DB_PROBLEM; } } } ?>