/** * Returns the filename * GetFilename wrapper of MongoGridFSFile function * @return string filename or False on error. * @since v1.3 */ public function getFilename() { Yii::trace('Trace: ' . __CLASS__ . '::' . __FUNCTION__ . '()', 'ext.MongoDb.EMongoGridFS'); if (method_exists($this->_gridFSFile, 'getFilename') === true) { return $this->_gridFSFile->getFilename(); } else { return false; } }
/** * Gets the filename for this file. * * @return string $filename */ public function getFilename() { if ($this->isDirty && $this->filename) { return $this->filename; } elseif ($this->mongoGridFSFile instanceof \MongoGridFSFile && ($filename = $this->mongoGridFSFile->getFilename())) { return $filename; } return $this->filename; }
public function testGetFilename() { $this->assertEquals($this->object->getFilename(), 'tests/somefile'); }
public function testGridFSProps() { $m = new Mongo(); $grid = $m->foo->getGridFS(); $x = new MongoGridFSFile($grid, array()); $this->assertNull($x->getFilename()); $this->assertNull($x->getSize()); }
protected function format_stat(MongoGridFSFile $file) { return array("name" => $file->getFilename(), "size" => $file->getSize(), "ts" => $file->file['uploadDate']->sec, "mime" => $file->file['metadata']['mime'], "read" => true, "write" => true, "width" => $file->file['metadata']['width'], "height" => $file->file['metadata']['height']); }
public function getFilename() { return $this->file->getFilename(); }