Esempio n. 1
0
 /**
  * Get a file in MongoGridFS
  * The result is cached to save resource.
  *
  * @return \MongoGridFS
  */
 public function getDocument()
 {
     if (!isset($this->cache['document'])) {
         $this->cache['document'] = $this->fs->findOne(array('filename' => $this->getResolvedPath()));
     }
     return $this->cache['document'];
 }