private function clearDocumentManagers()
    {
        if (!$this->container->hasParameter('doctrine_phpcr.odm.document_managers')) {
            return;
        }

        foreach ($this->container->getParameter('doctrine_phpcr.odm.document_managers') as $id) {
            if ($this->container instanceof IntrospectableContainerInterface && !$this->container->initialized($id)) {
                continue;
            }

            $this->container->get($id)->clear();
        }
    }
private function clearDocumentManagers()
    {
        if (!$this->container->hasParameter('doctrine_phpcr.odm.document_managers')) {
            return;
        }

        foreach ($this->container->getParameter('doctrine_phpcr.odm.document_managers') as $id) {
            if ($this->container instanceof IntrospectableContainerInterface && !$this->container->initialized($id)) {
                continue;
            }

            $this->container->get($id)->clear();
        }
    }
private function clearDocumentManagers ( ) { if ( ! $ this -> container -> hasParameter ( 'doctrine_phpcr.odm.document_managers' ) ) { return ; } foreach ( $ this -> container -> getParameter ( 'doctrine_phpcr.odm.document_managers' ) as $ id ) { if ( $ this -> container instanceof IntrospectableContainerInterface && ! $ this -> container -> initialized ( $ id ) ) { continue ; } $ this -> container -> get ( $ id ) -> clear ( ) ; } }
Clear all document managers to clear references to entities for GC.
Clear all document managers to clear references to entities for GC .