public function extract($entity)
    {
        if ($entity->persisted()) {
            $entity->delete()->save();
        }

        $this->_space->extractEntity($entity);
    }
public function extract($entity)
    {
        if ($entity->persisted()) {
            $entity->delete()->save();
        }

        $this->_space->extractEntity($entity);
    }
public function extract ( $ entity ) { if ( $ entity -> persisted ( ) ) { $ entity -> delete ( ) -> save ( ) ; } $ this -> _space -> extractEntity ( $ entity ) ; }
Extracts an entity from the repository and the space and deletes an entity if
it's persisted.

@param AnDomainEntityAbstract $entity The entity to extract
Extracts an entity from the repository and the space and deletes an entity if it s persisted .