Property | Type | Description | |
---|---|---|---|
$file | array |
Property | Type | Description | |
---|---|---|---|
$gridfs |
Method | Description | |
---|---|---|
__construct ( MongoGridFS $gridfs, array $file ) | ||
getBytes ( ) : string | This will load the file into memory. If the file is bigger than your memory, this will cause problems! | |
getFilename ( ) : string | Returns this file's filename | |
getResource ( ) : resource | This method returns a stream resource that can be used to read the stored file with all file functions in PHP. | |
getSize ( ) : integer | Returns this file's size | |
write ( string $filename = null ) : integer | Writes this file to the filesystem |
Method | Description | |
---|---|---|
copyToResource ( $handle ) | ||
getChunks ( ) |
public __construct ( MongoGridFS $gridfs, array $file ) | ||
$gridfs | MongoGridFS | The parent MongoGridFS instance |
$file | array | A file from the database |
public getFilename ( ) : string | ||
return | string | Returns the filename |
public getResource ( ) : resource | ||
return | resource | Returns a resource that can be used to read the file with |