class FetchFunction extends BaseFunction

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() %}

Methods

__construct()

No description

getFunctionOptions()

No description

getDI()

No description

string
getFunctionName()

Return function name

mixed
handle(string $what)

Fetch some dehydrated data.

Details

in BaseFunction at line 9
__construct()

in BaseFunction at line 18
getFunctionOptions()

in BaseFunction at line 23
getDI()

at line 33
string getFunctionName()

Return function name

Return Value

string

at line 48
mixed handle(string $what)

Fetch some dehydrated data.

{{ fetch('container').findFirstById(1) }}

Parameters

string $what

Return Value

mixed