BaseFluentFetch
class BaseFluentFetch extends Module
Base fluent fetch interface provides the inheriting class for custom fetch interfaces and the fallback if one isn't provided.
Properties
protected | $builder | ||
protected | $parentModel |
Methods
No description
Store binds reference for later
Get binds reference
Provides syntactically consistent andWherePublished
No description
Provides syntactically consistent andWhereIn handlers
No description
Provide an overload for the "orderBy" method
Provide a simple interface to handle findInPath functionality to find articles that fall in a SSTS path classification. Modifiers allow you to change the search mode
Provide a simple interface to handle findByTags functionality
{% set article = fetch('article').wherePublished().findByTags(['foo', 'bar']) %}
{% set article = fetch('article').wherePublished().findByTags(['foo', 'bar'], 'NOT') %}
Sluggifies the name so "Top Stories" and "top-stories" are treated the same.
Provide a simple interface to handle findByAuthors functionality
{% set article = fetch('article').wherePublished().findByAuthors(['foo', 'bar']) %}
Sluggifies the name so "Top Stories" and "top-stories" are treated the same.
Execute the query and return objects
Execute the query, automatically limiting to one and return the first result
No description
Details
at line 15
__construct()
at line 24
setBinds($binds)
Store binds reference for later
at line 32
getBinds()
Get binds reference
at line 41
Builder
andWherePublished()
Provides syntactically consistent andWherePublished
at line 46
wherePublished()
at line 59
Builder
whereIn(string $key, array $values)
Provides syntactically consistent andWhereIn handlers
at line 63
andWhereIn($key, $values)
at line 73
Builder
order()
Provide an overload for the "orderBy" method
at line 103
Collection
findInPath($path, $mode = '=')
Provide a simple interface to handle findInPath functionality to find articles that fall in a SSTS path classification. Modifiers allow you to change the search mode
=
Exact match (default)>
Ends with<
Starts with~
Contains<>
Does not contain
{# find articles where the ssts path matches 'sports/tennis' #}
{% set article = fetch('article').wherePublished().findInPath('sports/tennis') %}
{# find articles where the ssts path contains 'sports/tennis' anywhere #}
{% set article = fetch('article').wherePublished().findInPath('sports/tennis', '~') %}
at line 153
array
findByTags(array $tags = [], string $mode = 'AND', array $binds = null)
Provide a simple interface to handle findByTags functionality
{% set article = fetch('article').wherePublished().findByTags(['foo', 'bar']) %}
{% set article = fetch('article').wherePublished().findByTags(['foo', 'bar'], 'NOT') %}
Sluggifies the name so "Top Stories" and "top-stories" are treated the same.
Passing 'AND' or 'OR' for $mode
will include tags, passing 'NOT' will exclude them,
e.g. if you're looking for articles not tagged 'top-stories', use 'NOT' for $mode
;
at line 275
array
findByAuthors(array $authors = [], string $mode = 'AND', array $binds = null)
Provide a simple interface to handle findByAuthors functionality
{% set article = fetch('article').wherePublished().findByAuthors(['foo', 'bar']) %}
Sluggifies the name so "Top Stories" and "top-stories" are treated the same.
at line 321
mixed
find($binds = null)
Execute the query and return objects
at line 331
mixed
first($binds = null)
Execute the query, automatically limiting to one and return the first result