Skip to content

CriteriaElement

MekDrop edited this page Sep 13, 2022 · 2 revisions
Notice: Wiki was automatic generated from project sources as project API documentation. Do not edit manually!# Imponeer\Database\Criteria\CriteriaElement

Defines base criteria element

Methods

Name Description
__construct OrderByTrait constructor.
__get For compatibility. Probably will be removed in feature Gets variable value
__isset For compatibility. Probably will be removed in feature Checks if variable value is set
__set For compatibility. Probably will be removed in feature Sets variable
getBindData Gets data for rendered query for binding
getGroupBy Gets group by value
getLimit Gets how many results to return
getOrder Gets order
getSort Gets sort field
getStart Gets from what record number to return results (counting starts from 0)
render Render the criteria string
renderWhere Renders as 'where' SQL string
setGroupBy Sets group by
setLimit Sets how many results to return
setOrder Sets Order
setSort Sets sort field
setStart Sets from what record number to return results (counting starts from 0)

CriteriaElement::__construct

Description

public __construct (void)

OrderByTrait constructor.

Parameters

This function has no parameters.

Return Values

void


CriteriaElement::__get

Description

public __get (string $name)

For compatibility. Probably will be removed in feature Gets variable value

Parameters

  • (string) $name : Variable name

Return Values

mixed


CriteriaElement::__isset

Description

public __isset (string $name)

For compatibility. Probably will be removed in feature Checks if variable value is set

Parameters

  • (string) $name : Variable name

Return Values

mixed


CriteriaElement::__set

Description

public __set (string $name, mixed $value)

For compatibility. Probably will be removed in feature Sets variable

Parameters

  • (string) $name : Variable name
  • (mixed) $value : Variable value

Return Values

mixed


CriteriaElement::getBindData

Description

public getBindData (void)

Gets data for rendered query for binding

Parameters

This function has no parameters.

Return Values

array


CriteriaElement::getGroupBy

Description

public getGroupBy (void)

Gets group by value

Parameters

This function has no parameters.

Return Values

string


CriteriaElement::getLimit

Description

public getLimit (void)

Gets how many results to return

Parameters

This function has no parameters.

Return Values

int


CriteriaElement::getOrder

Description

public getOrder (void)

Gets order

Parameters

This function has no parameters.

Return Values

\Order


CriteriaElement::getSort

Description

public getSort (void)

Gets sort field

Parameters

This function has no parameters.

Return Values

string


CriteriaElement::getStart

Description

public getStart (void)

Gets from what record number to return results (counting starts from 0)

Parameters

This function has no parameters.

Return Values

int


CriteriaElement::render

Description

public render (bool $withBindVariables)

Render the criteria string

Parameters

  • (bool) $withBindVariables : Render with bind variables

Return Values

string|null


CriteriaElement::renderWhere

Description

public renderWhere (bool $withBinds)

Renders as 'where' SQL string

Parameters

  • (bool) $withBinds : Render with bind variables

Return Values

string


CriteriaElement::setGroupBy

Description

public setGroupBy (string $group)

Sets group by

Parameters

  • (string) $group

Return Values

self


CriteriaElement::setLimit

Description

public setLimit (int $limit)

Sets how many results to return

Parameters

  • (int) $limit : Limit for results

Return Values

self


CriteriaElement::setOrder

Description

public setOrder (string|\Order $order)

Sets Order

Parameters

  • (string|\Order) $order : Order to set for this criteria element

Return Values

self


CriteriaElement::setSort

Description

public setSort (string $sort)

Sets sort field

Parameters

  • (string) $sort : Database field name for sorting

Return Values

self


CriteriaElement::setStart

Description

public setStart (int $start)

Sets from what record number to return results (counting starts from 0)

Parameters

  • (int) $start : Sets start position

Return Values

self