Doctrine\OXM\XmlEntityManager::clear PHP Метод

clear() публичный Метод

Clears the EntityManager. All entities that are currently managed by this EntityManager become detached.
public clear ( string $entityName = null )
$entityName string
    public function clear($entityName = null)
    {
        if ($entityName === null) {
            $this->unitOfWork->clear();
        } else {
            //TODO
            throw new OXMException("EntityManager#clear(\$entityName) not yet implemented.");
        }
    }

Usage Example

Пример #1
0
 /**
  * Clears the repository, causing all managed entities to become detached.
  */
 public function clear()
 {
     $this->xem->clear($this->class->rootXmlEntityName);
 }