public static function map(CommandInterface $command) {
        $mapper = new static();
        $mapper->setCommand($command);
        if ($mapper->save() === false) {
            throw new YiiException('Unable to save an instance of \jlorente\command\db\CommandMapper. Errors: [' . Json::encode($mapper->getErrors()) . ']');
        }
    }