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()) . ']');
        }
    }
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()) . ']');
        }
    }
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 ( ) ) . ']' ) ; } }
Stores a CommandInterface object in the database.

@param CommandInterface $command
@throws YiiException
Stores a CommandInterface object in the database .