FetchFunction
extends BaseFunction
in package
The fetch function sort of replicates Gryphon's original fetch tag with a number of supercharged changes.
- First, and most obviously, it's not a tag anymore, but a function.
- Second, we can define specific interfaces for each data type, making interacting with them much easier, for example:
{%
set articles = fetch('article')
.wherePublished()
.find()
%}
You can also provide full class names to custom interfaces
{% set bloober = fetch('\\My\\Ns\\Bloober').orderForks().find() %}
Tags
Table of Contents
- __construct() : mixed
- getDI() : mixed
- getFunctionName() : string
- Return function name
- getFunctionOptions() : mixed
- handle() : mixed
- Fetch some [dehydrated](https://stackoverflow.com/questions/6991135/what-does-it-mean-to-hydrate-an-object) data.
Methods
__construct()
public
__construct() : mixed
Return values
mixed —getDI()
public
getDI() : mixed
Return values
mixed —getFunctionName()
Return function name
public
getFunctionName() : string
Return values
string —getFunctionOptions()
public
getFunctionOptions() : mixed
Return values
mixed —handle()
Fetch some [dehydrated](https://stackoverflow.com/questions/6991135/what-does-it-mean-to-hydrate-an-object) data.
public
handle(string $what) : mixed
{{ fetch('container').findFirstById(1) }}
Parameters
- $what : string