PHP Class Clockwork\Storage\FileStorage

Inheritance: extends Storage
Show file Open project: itsgoingd/clockwork Class Usage Examples

Public Methods

Method Description
__construct ( $path, $dirPermissions = 448 ) Return new storage, takes path where to store files as argument, throws exception if path is not writable
retrieve ( $id = null, $last = null ) Retrieve request specified by id argument, if second argument is specified, array of requests from id to last will be returned
store ( Request $request ) Store request, requests are stored in JSON representation in files named .json in storage path

Method Details

__construct() public method

Return new storage, takes path where to store files as argument, throws exception if path is not writable
public __construct ( $path, $dirPermissions = 448 )

retrieve() public method

Retrieve request specified by id argument, if second argument is specified, array of requests from id to last will be returned
public retrieve ( $id = null, $last = null )

store() public method

Store request, requests are stored in JSON representation in files named .json in storage path
public store ( Request $request )
$request Clockwork\Request\Request