public function cleanUp($allReaders = false)
    {
        $readers = $allReaders ? array_keys($this->readers) : $this->createdReaders;
        foreach ($readers as $id) {
            $this->readers[$id]->getParser()->getStreamReader()->cleanUp();
            unset($this->readers[$id]);
        }

        $this->createdReaders= [];
    }
public function cleanUp($allReaders = false)
    {
        $readers = $allReaders ? array_keys($this->readers) : $this->createdReaders;
        foreach ($readers as $id) {
            $this->readers[$id]->getParser()->getStreamReader()->cleanUp();
            unset($this->readers[$id]);
        }

        $this->createdReaders= [];
    }
public function cleanUp ( $ allReaders = false ) { $ readers = $ allReaders ? array_keys ( $ this -> readers ) : $ this -> createdReaders ; foreach ( $ readers as $ id ) { $ this -> readers [ $ id ] -> getParser ( ) -> getStreamReader ( ) -> cleanUp ( ) ; unset ( $ this -> readers [ $ id ] ) ; } $ this -> createdReaders = [ ] ; }
Release resources and file handles.

This method is called internally when the document is created successfully. By default it only cleans up
stream reader instances which were created internally.

@param bool $allReaders
Release resources and file handles .