Created
July 1, 2014 14:42
-
-
Save spolischook/bb5209272e1023345d0a to your computer and use it in GitHub Desktop.
Get all documents from DocumentManager
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| $this->dm = $this->getContainer()->get('doctrine.odm.mongodb.document_manager'); | |
| $meta = $this->dm->getMetadataFactory()->getAllMetadata(); | |
| $documents = array(); | |
| foreach ($meta as $m) { | |
| $documents[] = $m->getName(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment