FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Handler Class Reference

Stream handler. More...

Inheritance diagram for Handler:
Thing Cache Resize

Public Member Functions

 __construct ($stream, $config)
 
 search ($handlers, $mask=' *')
 Search for files. More...
 
 exists ($handlers, $filename, $params=null)
 Check if a file exists. More...
 
 time ($handlers, $filename, $params=null)
 Modification time of a file. More...
 
 read ($handlers, $filename, $params=null)
 Read a file. More...
 
 save ($handlers, $filename, $params, $data)
 Save a file. More...
 
 delete ($handlers, $filename, $params=null)
 Save a file. More...
 
- Public Member Functions inherited from Thing
 propertyExists ($property)
 Check if a property exists (public or published). More...
 
 constants ($prefix=null)
 Return all constants. More...
 
 get ($key)
 Get one or more properties. More...
 
 set ($key, $value=null)
 Set one or more properties. More...
 
 __get ($key)
 
 __set ($key, $value)
 

Protected Attributes

 $_stream
 
 $_config = null
 
- Protected Attributes inherited from Thing
 $_published = []
 Published properties (key = name of property, value = visibility). More...
 

Additional Inherited Members

- Data Fields inherited from Thing
const HIDDEN = 0
 Property is hidden. More...
 
const READABLE = 1
 Property is readable. More...
 
const WRITEABLE = 2
 Property is writeable. More...
 
const READWRITE = 3
 Property is readable and writeable. More...
 
- Protected Member Functions inherited from Thing
 publish ($property, $visibility=self::READABLE)
 Publish a property (or hide it again). More...
 
 configure ($config)
 Configure the object. More...
 
 _get ($key)
 Default getter if no specific setter is defined, and the property is also not published (readable). More...
 
 _set ($key, $value)
 Default setter if no specific setter is defined, and the property is also not published (writeable). More...
 

Detailed Description

Stream handler.

In this default implementation all requests are forwarded to the next handler in the chain.

Definition at line 9 of file Handler.php.

Constructor & Destructor Documentation

◆ __construct()

__construct (   $stream,
  $config 
)

Definition at line 14 of file Handler.php.

Member Function Documentation

◆ delete()

delete (   $handlers,
  $filename,
  $params = null 
)

Save a file.

Parameters
array$handlersDownstream handlers.
string$filenameFilename.
array$paramsParameters.
Returns
bool True when succesful.

Definition at line 75 of file Handler.php.

◆ exists()

exists (   $handlers,
  $filename,
  $params = null 
)

Check if a file exists.

Parameters
array$handlersDownstream handlers.
string$filenameFilename.
array$paramsParameters.
Returns
bool

Definition at line 34 of file Handler.php.

◆ read()

read (   $handlers,
  $filename,
  $params = null 
)

Read a file.

Parameters
array$handlersDownstream handlers.
string$filenameFilename.
array$paramsParameters.
Returns
string Binary data.

Definition at line 54 of file Handler.php.

◆ save()

save (   $handlers,
  $filename,
  $params,
  $data 
)

Save a file.

Parameters
array$handlersDownstream handlers.
string$filenameFilename.
array$paramsParameters.
string$dataBinary data.
Returns
bool True when succesful.

Definition at line 65 of file Handler.php.

◆ search()

search (   $handlers,
  $mask = '*' 
)

Search for files.

Parameters
array$handlersDownstream handlers.
string$maskFilter mask.
Returns
array Filenames found.

Definition at line 24 of file Handler.php.

◆ time()

time (   $handlers,
  $filename,
  $params = null 
)

Modification time of a file.

Parameters
array$handlersDownstream handlers.
string$filenameFilename.
array$paramsParameters.
Returns
int Unix timestamp.

Definition at line 44 of file Handler.php.

Field Documentation

◆ $_config

$_config = null
protected

Definition at line 12 of file Handler.php.

◆ $_stream

$_stream
protected

Definition at line 11 of file Handler.php.


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