Skip to content
Travis edited this page Mar 13, 2014 · 8 revisions

Box\Query

Query

Constants

ASC

const ASC = 'ASC'

DESC

const DESC = 'DESC'

Properties

$_aggregate

private mixed $_aggregate
  • Visibility: private

$_rootToken

private mixed $_rootToken
  • Visibility: private

$_child

protected \Box\QueryBase $_child
  • Visibility: protected

$_token

protected \Box\TokenBase $_token
  • Visibility: protected

$_root

protected \Box\Query $_root
  • Visibility: protected

Methods

\Box\Query::__construct()

mixed Box\Query::\Box\Query::__construct()(\Box\DataObjectInterface $instance)

Use ::create if you can find it. Otherwise this.

  • Visibility: private

Arguments

\Box\Query::create()

\Box\Query Box\Query::\Box\Query::create()(\Box\DataObjectInterface $instance)

Create a new query.

  • Visibility: public
  • This method is static.

Arguments

\Box\Query::getToken()

\Box\TokenRoot Box\Query::\Box\Query::getToken()()

Tokenize this query. For internal use. But may be useful for debugging.

  • Visibility: public

\Box\Query::contains()

\Box\QueryOperation Box\Query::\Box\Query::contains()(string $property, string $value, boolean $caseSensitive)

Set the condition that a string property must contain the given substring.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string - <p>The string you want that property to contain.</p>
  • $caseSensitive boolean

\Box\Query::endsWith()

\Box\QueryOperation Box\Query::\Box\Query::endsWith()(string $property, string $value, boolean $caseSensitive)

Set the condition that a string property must end with the given substring.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string - <p>The string you want that property to end with.</p>
  • $caseSensitive boolean

\Box\Query::startsWith()

\Box\QueryOperation Box\Query::\Box\Query::startsWith()(string $property, string $value, boolean $caseSensitive)

Set the condition that a string property must start with the given substring.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string - <p>The string you want that property to start with.</p>
  • $caseSensitive boolean

\Box\Query::equals()

\Box\QueryOperation Box\Query::\Box\Query::equals()(string $property, string|float|boolean|integer|string[]|float[]|boolean[]|integer[]|null $value)

Set the condition that a property must have a given value.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string|float|boolean|integer|string[]|float[]|boolean[]|integer[]|null - <p>The value the property should have to satisfy the condition.</p>

\Box\Query::notEquals()

\Box\QueryOperation Box\Query::\Box\Query::notEquals()(string $property, string|float|boolean|integer|string[]|float[]|boolean[]|integer[]|null $value)

Set the condition that a property must not have a given value.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string|float|boolean|integer|string[]|float[]|boolean[]|integer[]|null - <p>The value the property should not have to satisfy the condition.</p>

\Box\Query::greaterThan()

\Box\QueryOperation Box\Query::\Box\Query::greaterThan()(string $property, float|integer $value)

Set the condition that a numerical property must be greater than a given value.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value float|integer - <p>The value the property should be greater than to satisfy the condition.</p>

\Box\Query::greaterThanOrEquals()

\Box\QueryOperation Box\Query::\Box\Query::greaterThanOrEquals()(string $property, float|integer $value)

Set the condition that a numerical property must be greater than or equal to a given value.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value float|integer - <p>The value the property should be greater than or equal to to satisfy the condition.</p>

\Box\Query::lessThan()

\Box\QueryOperation Box\Query::\Box\Query::lessThan()(string $property, float|integer $value)

Set the condition that a numerical property must be greater than a given value.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value float|integer - <p>The value the property should be less than to satisfy the condition.</p>

\Box\Query::lessThanOrEquals()

\Box\QueryOperation Box\Query::\Box\Query::lessThanOrEquals()(string $property, float|integer $value)

Set the condition that a numerical property must be greater than or equal to a given value.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value float|integer - <p>The value the property should be less than or equal to to satisfy the condition.</p>

\Box\Query::in()

\Box\QueryOperation Box\Query::\Box\Query::in()(string $property, string[]|float[]|boolean[]|integer[] $values)

Set the condition that a property must be equal to any value in a given set.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $values string[]|float[]|boolean[]|integer[] - <p>The values the property should be equal to any of to satisfy the condition.</p>

\Box\Query::notIn()

\Box\QueryOperation Box\Query::\Box\Query::notIn()(string $property, string[]|float[]|boolean[]|integer[] $values)

Set the condition that a property must not be equal to any value in a given set.

  • Visibility: public

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $values string[]|float[]|boolean[]|integer[] - <p>The values the property should not be equal to any of to satisfy the condition.</p>

\Box\QueryLimitOrOrderBy::limit()

\Box\QueryOffset Box\Query::\Box\QueryLimitOrOrderBy::limit()(integer $limit)

Limit the result set.

  • Visibility: public

Arguments

  • $limit integer - <p>The maximum number of objects you want.</p>

\Box\QueryLimitOrOrderBy::orderBy()

\Box\QueryLimitOrOrderBy Box\Query::\Box\QueryLimitOrOrderBy::orderBy()(string $property, string $direction)

Order the result set.

  • Visibility: public

Arguments

  • $property string - <p>The property to order by.</p>
  • $direction string - <p>The direction to order. Use the class constants ::ASC and ::DESC.</p>

\Box\QueryBase::_getToken()

\Box\TokenBase Box\Query::\Box\QueryBase::_getToken()()

Get the token this query element translates to.

  • Visibility: protected

\Box\QueryBase::getToken()

\Box\TokenRoot Box\Query::\Box\QueryBase::getToken()()

Get the token representing the root of the query this query part belongs to, if any.

  • Visibility: public

\Box\QueryInterfaceCondition::contains()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::contains()(string $property, string $value, boolean $caseSensitive)

Set the condition that a string property must contain the given substring.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string - <p>The string you want that property to contain.</p>
  • $caseSensitive boolean

\Box\QueryInterfaceCondition::endsWith()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::endsWith()(string $property, string $value, boolean $caseSensitive)

Set the condition that a string property must end with the given substring.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string - <p>The string you want that property to end with.</p>
  • $caseSensitive boolean

\Box\QueryInterfaceCondition::startsWith()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::startsWith()(string $property, string $value, boolean $caseSensitive)

Set the condition that a string property must start with the given substring.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string - <p>The string you want that property to start with.</p>
  • $caseSensitive boolean

\Box\QueryInterfaceCondition::equals()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::equals()(string $property, string|float|boolean|integer|string[]|float[]|boolean[]|integer[]|null $value)

Set the condition that a property must have a given value.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string|float|boolean|integer|string[]|float[]|boolean[]|integer[]|null - <p>The value the property should have to satisfy the condition.</p>

\Box\QueryInterfaceCondition::notEquals()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::notEquals()(string $property, string|float|boolean|integer|string[]|float[]|boolean[]|integer[]|null $value)

Set the condition that a property must not have a given value.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value string|float|boolean|integer|string[]|float[]|boolean[]|integer[]|null - <p>The value the property should not have to satisfy the condition.</p>

\Box\QueryInterfaceCondition::greaterThan()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::greaterThan()(string $property, float|integer $value)

Set the condition that a numerical property must be greater than a given value.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value float|integer - <p>The value the property should be greater than to satisfy the condition.</p>

\Box\QueryInterfaceCondition::greaterThanOrEquals()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::greaterThanOrEquals()(string $property, float|integer $value)

Set the condition that a numerical property must be greater than or equal to a given value.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value float|integer - <p>The value the property should be greater than or equal to to satisfy the condition.</p>

\Box\QueryInterfaceCondition::lessThan()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::lessThan()(string $property, float|integer $value)

Set the condition that a numerical property must be greater than a given value.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value float|integer - <p>The value the property should be less than to satisfy the condition.</p>

\Box\QueryInterfaceCondition::lessThanOrEquals()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::lessThanOrEquals()(string $property, float|integer $value)

Set the condition that a numerical property must be greater than or equal to a given value.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $value float|integer - <p>The value the property should be less than or equal to to satisfy the condition.</p>

\Box\QueryInterfaceCondition::in()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::in()(string $property, string[]|float[]|boolean[]|integer[] $values)

Set the condition that a property must be equal to any value in a given set.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $values string[]|float[]|boolean[]|integer[] - <p>The values the property should be equal to any of to satisfy the condition.</p>

\Box\QueryInterfaceCondition::notIn()

mixed Box\QueryInterfaceCondition::\Box\QueryInterfaceCondition::notIn()(string $property, array $values)

Set the condition that a property must not be equal to any value in a given set.

Arguments

  • $property string - <p>The property you want to set a condition on.</p>
  • $values array

Clone this wiki locally