Class ElggFile
This class represents a physical file.
Create a new ElggFile object and specify a filename, and optionally a FileStore (if one isn't specified then the default is assumed.)
Open the file using the appropriate mode, and you will be able to read and write to the file.
Optionally, you can also call the file's save() method, this will turn the file into an entity in the system and permit you to do things like attach tags to the file etc. This is not done automatically since there are many occasions where you may want access to file data on datastores using the ElggFile interface but do not want to create an Entity reference to it in the system (temporary files for example).
- ElggData implements Loggable, Iterator, ArrayAccess, Exportable
- ElggEntity implements Notable, Locatable, Importable
- ElggObject
- ElggFile
protected
|
|
public
|
|
public
|
|
public
string
|
|
public
string
|
#
getFilenameOnFilestore( )
Return the filename of this file as it is/will be stored on the filestore, which may be different to the filename. |
public
integer
|
#
getFilestoreSize( string $prefix = '', integer $container_guid = 0 )
Return the size of the filestore associated with this file |
public
string
|
|
public
boolean
|
|
public
mixed
|
#
detectMimeType( mixed $file = null, mixed $default = null )
Detects mime types based on filename or actual file. |
public
boolean
|
|
public
resource
|
|
public
boolean
|
|
public
mixed
|
|
public
mixed
|
|
public
boolean
|
|
public
boolean
|
|
public
boolean
|
|
public
integer
|
|
public
integer
|
|
public
boolean
|
|
public
boolean
|
|
public
|
|
protected
|
#
getFilestore( )
Return a filestore suitable for saving this file. This filestore is either a pre-registered filestore, a filestore as recorded in metadata or the system default. |
public
boolean
|
addToSite(),
canComment(),
getExportableValues(),
getSites(),
load()
|
__get(),
__isset(),
__set(),
current(),
getClassName(),
getTimeCreated(),
key(),
next(),
offsetExists(),
offsetGet(),
offsetSet(),
offsetUnset(),
rewind(),
valid()
|
$icon_override,
$temp_annotations,
$temp_metadata,
$temp_private_settings,
$url_override,
$volatile
|
$attributes,
$valid
|
$description,
$tags,
$title
|
$access_id,
$container_guid,
$enabled,
$guid,
$owner_guid,
$site_guid,
$subtype,
$time_created,
$time_updated,
$type
|