AdFluentFetch
extends BaseFluentFetch
in package
Fluent Fetcher for snworks:ad
Table of Contents
- $builder : mixed
- $parentModel : mixed
- $_bindStack : mixed
- $categoryChannelId : mixed
- $channelId : mixed
- __call() : mixed
- __construct() : mixed
- andWhereIn() : mixed
- andWherePublished() : Builder
- Provides syntactically consistent andWherePublished
- find() : mixed
- Execute the query and return objects
- findByAuthors() : array<string|int, mixed>
- 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.
- findByTags() : array<string|int, mixed>
- 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.
- findInPath() : Collection
- 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
- first() : mixed
- Execute the query, automatically limiting to one and return the first result
- getBinds() : mixed
- Get binds reference
- mergeBinds() : array<string|int, mixed>
- Merge binds
- order() : Builder
- Provide an overload for the "orderBy" method
- orderBy() : self
- Handle proper sorting
- setBinds() : mixed
- Store binds reference for later
- where() : self
- Override where, most of these are looking for featured, so "status = 1" classifieds. That changes with the Entry method.
- whereIn() : Builder
- Provides syntactically consistent andWhereIn handlers
- wherePublished() : mixed
Properties
$builder
protected
mixed
$builder
$parentModel
protected
mixed
$parentModel
= '\Ceo\Models\Entry'
$_bindStack
private
mixed
$_bindStack
$categoryChannelId
private
mixed
$categoryChannelId
$channelId
private
mixed
$channelId
Methods
__call()
public
__call(mixed $f, mixed $args) : mixed
Parameters
- $f : mixed
- $args : mixed
Return values
mixed —__construct()
public
__construct() : mixed
Return values
mixed —andWhereIn()
public
andWhereIn(mixed $key, mixed $values) : mixed
Parameters
- $key : mixed
- $values : mixed
Return values
mixed —andWherePublished()
Provides syntactically consistent andWherePublished
public
andWherePublished() : Builder
Return values
Builder —find()
Execute the query and return objects
public
find([mixed $binds = NULL ]) : mixed
Parameters
- $binds : mixed = NULL
Return values
mixed —Result set of Phalcon models
findByAuthors()
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.
public
findByAuthors([mixed $authors = [] ][, mixed $mode = 'AND' ][, mixed $binds = null ]) : array<string|int, mixed>
Parameters
- $authors : mixed = []
- $mode : mixed = 'AND'
- $binds : mixed = null
Tags
Return values
array<string|int, mixed> —findByTags()
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.
public
findByTags([mixed $tags = [] ][, mixed $mode = 'AND' ][, mixed $binds = null ]) : array<string|int, mixed>
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
;
Parameters
- $tags : mixed = []
- $mode : mixed = 'AND'
- $binds : mixed = null
Tags
Return values
array<string|int, mixed> —findInPath()
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
public
findInPath(mixed $path[, mixed $mode = '=' ]) : Collection
-
=
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', '~') %}
Parameters
- $path : mixed
- $mode : mixed = '='
Return values
Collection —first()
Execute the query, automatically limiting to one and return the first result
public
first([mixed $binds = null ]) : mixed
Parameters
- $binds : mixed = null
Return values
mixed —Result set
getBinds()
Get binds reference
public
getBinds() : mixed
Return values
mixed —mergeBinds()
Merge binds
public
mergeBinds([array<string|int, mixed> $binds = [] ]) : array<string|int, mixed>
Parameters
- $binds : array<string|int, mixed> = []
Return values
array<string|int, mixed> —order()
Provide an overload for the "orderBy" method
public
order() : Builder
Return values
Builder —orderBy()
Handle proper sorting
public
orderBy(mixed $str) : self
Parameters
- $str : mixed
Return values
self —setBinds()
Store binds reference for later
public
setBinds(mixed $binds) : mixed
Parameters
- $binds : mixed
Return values
mixed —where()
Override where, most of these are looking for featured, so "status = 1" classifieds. That changes with the Entry method.
public
where(mixed $str) : self
Parameters
- $str : mixed
Return values
self —whereIn()
Provides syntactically consistent andWhereIn handlers
public
whereIn(mixed $key, mixed $values) : Builder
Parameters
- $key : mixed
- $values : mixed
Return values
Builder —wherePublished()
public
wherePublished() : mixed