PHP Class Psecio\Gatekeeper\Handler\FindBy

Inheritance: extends Psecio\Gatekeeper\Handler
Show file Open project: psecio/gatekeeper

Public Methods

Method Description
execute ( ) : mixed Execute the "find by *" handling - smart enough to know if it's for one or multiple
handleFindBy ( string $name, array $args ) : object Handle the "findBy" calls for data
handleFindByMultiple ( string $name, array $args, array $matches ) : Modler\Collection Handle the "find by" when multiple are requested
handleFindBySingle ( string $name, array $args, array $matches ) : Modler\Collection Handle the "find by" when a single record is requested

Method Details

execute() public method

Execute the "find by *" handling - smart enough to know if it's for one or multiple
public execute ( ) : mixed
return mixed Single model instance or collection on multiple

handleFindBy() public method

Handle the "findBy" calls for data
public handleFindBy ( string $name, array $args ) : object
$name string Function name called
$args array Arguments
return object Model instance

handleFindByMultiple() public method

Handle the "find by" when multiple are requested
public handleFindByMultiple ( string $name, array $args, array $matches ) : Modler\Collection
$name string Name of function called
$args array Arguments list
$matches array Matches from regex
return Modler\Collection collection

handleFindBySingle() public method

Handle the "find by" when a single record is requested
public handleFindBySingle ( string $name, array $args, array $matches ) : Modler\Collection
$name string Name of function called
$args array Arguments list
$matches array Matches from regex
return Modler\Collection collection