Elgg  Version 2.3
Public Member Functions | Public Attributes | List of all members
Elgg\FileService\File Class Reference

File service. More...

Public Member Functions

 setFile (\ElggFile $file)
 Set file object. More...
 
 getFile ()
 Returns file object. More...
 
 setExpires ($expires= '+2 hours')
 Sets URL expiration. More...
 
 setDisposition ($disposition=self::ATTACHMENT)
 Sets content disposition. More...
 
 bindSession ($use_cookie=true)
 Bind URL to current user session. More...
 
 getURL ()
 Returns publicly accessible URL. More...
 

Public Attributes

const INLINE = 'inline'
 
const ATTACHMENT = 'attachment'
 

Detailed Description

File service.

private

Definition at line 12 of file File.php.

Member Function Documentation

Elgg\FileService\File::bindSession (   $use_cookie = true)

Bind URL to current user session.

Parameters
bool$use_cookieUse cookie
Returns
void

Definition at line 84 of file File.php.

Elgg\FileService\File::getFile ( )

Returns file object.

Returns
|null

Definition at line 51 of file File.php.

Elgg\FileService\File::getURL ( )

Returns publicly accessible URL.

Returns
string|false

Definition at line 92 of file File.php.

Elgg\FileService\File::setDisposition (   $disposition = self::ATTACHMENT)

Sets content disposition.

Parameters
string$dispositionContent disposition ('inline' or 'attachment')
Returns
void

Definition at line 71 of file File.php.

Elgg\FileService\File::setExpires (   $expires = '+2 hours')

Sets URL expiration.

Parameters
int$expiresString suitable for strtotime()
Returns
void

Definition at line 61 of file File.php.

Elgg\FileService\File::setFile ( \ElggFile  $file)

Set file object.

Parameters
\ElggFile$fileFile object
Returns
void

Definition at line 43 of file File.php.

Member Data Documentation

const Elgg\FileService\File::ATTACHMENT = 'attachment'

Definition at line 15 of file File.php.

const Elgg\FileService\File::INLINE = 'inline'

Definition at line 14 of file File.php.


The documentation for this class was generated from the following file: