FRED™  3.0
FRED™: Framework for Rapid and Easy Development
Stream Class Reference
Inheritance diagram for Stream:
Component Thing

Public Member Functions

 handlersExist ($handlers)
 Check if the handlers exist. More...
 
 handler ($name)
 Get a stream handler. More...
 
 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 Component
 __construct ($fred, $config=null)
 
 __destruct ()
 
 clientConfig ()
 Public configuration. More...
 
 config ($key, $default=null)
 Retrieve a config value. More...
 
 ping ()
 Ping function. More...
 
 filemtime ($filename)
 Filemtime with session cache. More...
 
 component ($name)
 Get a component (local or default). More...
 
 components (... $names)
 Get multiple components in an array. 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)
 

Data Fields

 $protocol = 'fred'
 
 $className = __CLASS__ . '\\Wrapper'
 
 $handlers = []
 
- Data Fields inherited from Component
 $filemtimeTtl = 0
 
- 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

 init ()
 
- Protected Member Functions inherited from Component
 init ()
 
 done ()
 
 getSession ()
 
- 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...
 

Additional Inherited Members

- Protected Attributes inherited from Component
 $_fred = null
 
 $_config = null
 
 $_name = null
 
 $_components = []
 Local components (key = component name, value = component). More...
 
 $_session = null
 
- Protected Attributes inherited from Thing
 $_published = []
 Published properties (key = name of property, value = visibility). More...
 

Detailed Description

Definition at line 5 of file Stream.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 105 of file Stream.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 56 of file Stream.php.

◆ handler()

handler (   $name)

Get a stream handler.

Parameters
string$nameStream handler name.
Returns
Stream\Handler

Definition at line 30 of file Stream.php.

◆ handlersExist()

handlersExist (   $handlers)

Check if the handlers exist.

Parameters
array$handlers
Returns
bool True if all handlers exist.

Definition at line 21 of file Stream.php.

◆ init()

init ( )
protected

Definition at line 12 of file Stream.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 80 of file Stream.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 93 of file Stream.php.

◆ search()

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

Search for files.

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

Definition at line 44 of file Stream.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 68 of file Stream.php.

Field Documentation

◆ $className

$className = __CLASS__ . '\\Wrapper'

Definition at line 8 of file Stream.php.

◆ $handlers

$handlers = []

Definition at line 10 of file Stream.php.

◆ $protocol

$protocol = 'fred'

Definition at line 7 of file Stream.php.


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