PHP Interface Fakerino\Core\FakeHandler\HandlerInterface

Author: Nicola Pietroluongo ([email protected])
Datei anzeigen Open project: fakerino/fakerino Interface Usage Examples

Public Methods

Method Description
getFirstChain ( ) : Handler Returns the first Handler in the chain.
getOutput ( string $class, string | array | null $options = null ) : string | array Generates the output.
handle ( FakeElement $data ) : mixed Handles the request or redirect the request to the successor.
resetFirstChain ( ) : Handler Resets the first Handler in the chain.
setSuccessor ( Fakerino\Core\FakeHandler\HandlerInterface $handler ) Sets a successor handler, in case the class is not able to satisfy the request.

Method Details

getFirstChain() static public method

Returns the first Handler in the chain.
static public getFirstChain ( ) : Handler
return Handler

getOutput() public method

Generates the output.
public getOutput ( string $class, string | array | null $options = null ) : string | array
$class string
$options string | array | null
return string | array

handle() public method

Handles the request or redirect the request to the successor.
public handle ( FakeElement $data ) : mixed
$data Fakerino\Core\FakeElement
return mixed

resetFirstChain() static public method

Resets the first Handler in the chain.
static public resetFirstChain ( ) : Handler
return Handler

setSuccessor() public method

Sets a successor handler, in case the class is not able to satisfy the request.
public setSuccessor ( Fakerino\Core\FakeHandler\HandlerInterface $handler )
$handler Fakerino\Core\FakeHandler\HandlerInterface