protected function execute(string $action)
    {
        if (!$this->getCollectionName()) {
            return false;
        }

        $options = [
            'writeConcern' => new WriteConcern($this->getWriteConcern()),
        ];

        if ($result = $this->getDataMapper()->$action($this, $options)) {
            $this->syncOriginalAttributes();
        }

        return $result;
    }
protected function execute(string $action)
    {
        if (!$this->getCollectionName()) {
            return false;
        }

        $options = [
            'writeConcern' => new WriteConcern($this->getWriteConcern()),
        ];

        if ($result = $this->getDataMapper()->$action($this, $options)) {
            $this->syncOriginalAttributes();
        }

        return $result;
    }
protected function execute ( string $ action ) { if ( ! $ this -> getCollectionName ( ) ) { return false ; } $ options = [ 'writeConcern' => new WriteConcern ( $ this -> getWriteConcern ( ) ) , ] ; if ( $ result = $ this -> getDataMapper ( ) -> $ action ( $ this , $ options ) ) { $ this -> syncOriginalAttributes ( ) ; } return $ result ; }
Performs the given action into database.

@param string $action datamapper function to execute

@return bool
Performs the given action into database .