PHP Interface Fakerino\Core\FakeHandler\HandlerInterface

Author: Nicola Pietroluongo ([email protected])
Afficher le fichier Open project: fakerino/fakerino Interface Usage Examples

Méthodes publiques

Méthode 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 méthode

Returns the first Handler in the chain.
static public getFirstChain ( ) : Handler
Résultat Handler

getOutput() public méthode

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

handle() public méthode

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

resetFirstChain() static public méthode

Resets the first Handler in the chain.
static public resetFirstChain ( ) : Handler
Résultat Handler

setSuccessor() public méthode

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