/** * @throws InvalidCommandException */ public function __call($command, array $arguments) { $command = strtoupper($command); if (!isset($this->commandHandlers[$command])) { throw new InvalidCommandException($command); } $command = $this->commandHandlers[$command]; $command->setArguments($arguments); $result = $this->connectionManager->execute($command); return $command->parse($result); }