ElggFilestore Class Reference

Inheritance diagram for ElggFilestore:
ElggDiskFilestore

List of all members.

Public Member Functions

 open (ElggFile $file, $mode)
 Attempt to open the file $file for storage or writing.
 write ($f, $data)
 Write data to a given file handle.
 read ($f, $length, $offset=0)
 Read data from a filestore.
 seek ($f, $position)
 Seek a given position within a file handle.
 eof ($f)
 Return a whether the end of a file has been reached.
 tell ($f)
 Return the current position in an open file.
 close ($f)
 Close a given file handle.
 delete (ElggFile $file)
 Delete the file associated with a given file handle.
 getFileSize (ElggFile $file)
 Return the size in bytes for a given file.
 getFilenameOnFilestore (ElggFile $file)
 Return the filename of a given file as stored on the filestore.
 getParameters ()
 Get the filestore's creation parameters as an associative array.
 setParameters (array $parameters)
 Set the parameters from the associative array produced by $this->getParameters().
 grabFile (ElggFile $file)
 Get the contents of the whole file.
 exists (ElggFile $file)
 Return whether a file physically exists or not.

Detailed Description

Definition at line 9 of file ElggFilestore.php.


Member Function Documentation

ElggFilestore::close ( f  )  [abstract]

Close a given file handle.

Parameters:
mixed $f The file handle
Returns:
bool

Reimplemented in ElggDiskFilestore.

ElggFilestore::delete ( ElggFile file  )  [abstract]

Delete the file associated with a given file handle.

Parameters:
ElggFile $file The file
Returns:
bool

Reimplemented in ElggDiskFilestore.

ElggFilestore::eof ( f  )  [abstract]

Return a whether the end of a file has been reached.

Parameters:
mixed $f The file handle.
Returns:
boolean

Reimplemented in ElggDiskFilestore.

ElggFilestore::exists ( ElggFile file  )  [abstract]

Return whether a file physically exists or not.

Parameters:
ElggFile $file The file
Returns:
bool

Reimplemented in ElggDiskFilestore.

ElggFilestore::getFilenameOnFilestore ( ElggFile file  )  [abstract]

Return the filename of a given file as stored on the filestore.

Parameters:
ElggFile $file The file
Returns:
string

Reimplemented in ElggDiskFilestore.

ElggFilestore::getFileSize ( ElggFile file  )  [abstract]

Return the size in bytes for a given file.

Parameters:
ElggFile $file The file
Returns:
int

Reimplemented in ElggDiskFilestore.

ElggFilestore::getParameters (  )  [abstract]

Get the filestore's creation parameters as an associative array.

Used for serialisation and for storing the creation details along side a file object.

Returns:
array

Reimplemented in ElggDiskFilestore.

ElggFilestore::grabFile ( ElggFile file  )  [abstract]

Get the contents of the whole file.

Parameters:
mixed $file The file handle.
Returns:
mixed The file contents.

Reimplemented in ElggDiskFilestore.

ElggFilestore::open ( ElggFile file,
mode 
) [abstract]

Attempt to open the file $file for storage or writing.

Parameters:
ElggFile $file A file
string $mode "read", "write", "append"
Returns:
mixed A handle to the opened file or false on error.

Reimplemented in ElggDiskFilestore.

ElggFilestore::read ( f,
length,
offset = 0 
) [abstract]

Read data from a filestore.

Parameters:
mixed $f The file handle
int $length Length in bytes to read.
int $offset The optional offset.
Returns:
mixed String of data or false on error.

Reimplemented in ElggDiskFilestore.

ElggFilestore::seek ( f,
position 
) [abstract]

Seek a given position within a file handle.

Parameters:
mixed $f The file handle.
int $position The position.
Returns:
void

Reimplemented in ElggDiskFilestore.

ElggFilestore::setParameters ( array $  parameters  )  [abstract]

Set the parameters from the associative array produced by $this->getParameters().

Parameters:
array $parameters A list of parameters
Returns:
bool

Reimplemented in ElggDiskFilestore.

ElggFilestore::tell ( f  )  [abstract]

Return the current position in an open file.

Parameters:
mixed $f The file handle.
Returns:
int

Reimplemented in ElggDiskFilestore.

ElggFilestore::write ( f,
data 
) [abstract]

Write data to a given file handle.

Parameters:
mixed $f The file handle - exactly what this is depends on the file system
string $data The binary string of data to write
Returns:
int Number of bytes written.

Reimplemented in ElggDiskFilestore.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations
Generated on Wed May 22 00:01:49 2013 for Elgg by  doxygen 1.6.3