src/AbstractMapper.php
public function delete($entityId, $col = 'id')
    {
        if (is_null($entityId)
            || (!is_numeric($entityId) && !is_a($entityId, $this->entityClass))) {
            throw new \InvalidArgumentException(
                "Invalid entity or entityId argument."
            );
        }

        if ($entityId instanceof $this->entityClass) {
            $entityId = $entityId->id;
        }

        return $this->adapter->delete($this->entityTable, "$col = $entityId");
    }
public function delete($entityId, $col = 'id')
    {
        if (is_null($entityId)
            || (!is_numeric($entityId) && !is_a($entityId, $this->entityClass))) {
            throw new \InvalidArgumentException(
                "Invalid entity or entityId argument."
            );
        }

        if ($entityId instanceof $this->entityClass) {
            $entityId = $entityId->id;
        }

        return $this->adapter->delete($this->entityTable, "$col = $entityId");
    }
public function delete ( $ entityId , $ col = 'id' ) { if ( is_null ( $ entityId ) || ( ! is_numeric ( $ entityId ) && ! is_a ( $ entityId , $ this -> entityClass ) ) ) { throw new \ InvalidArgumentException ( "Invalid entity or entityId argument." ) ; } if ( $ entityId instanceof $ this -> entityClass ) { $ entityId = $ entityId -> id ; } return $ this -> adapter -> delete ( $ this -> entityTable , "$col = $entityId" ) ; }
Delete one or more entities from the storage
@param $entityId
@param string $col
@return mixed
Delete one or more entities from the storage