Download the PHP package rebelcode/expression-wp-query-builder-abstract without Composer
On this page you can find all versions of the php package rebelcode/expression-wp-query-builder-abstract. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rebelcode/expression-wp-query-builder-abstract
More information about rebelcode/expression-wp-query-builder-abstract
Files in rebelcode/expression-wp-query-builder-abstract
Package expression-wp-query-builder-abstract
Short Description Abstract functionality for building WP_Query args using expressions.
License GPL-3.0
Informations about the package expression-wp-query-builder-abstract
RebelCode - Expression WP Query Builder - Abstract
Abstract functionality for building WP_Query
args using expressions.
Details
This package provides abstract functionality for the most implementation aspects of building WP_Query
arguments from
expressions. The traits in this package are meant to complement each other, while also remaining agnostic of the each
other's implementation details. Most, if not all, traits are designed to provide functionality that depends on
abstracted methods. Other traits in the package will offer implementations for those abstracted methods, while also
depending on their own abstracted methods.
Traits
BuildWpQueryArgsCapableTrait
:eye: Build Args
Intended to provide the entry point functionality of building an expression into WP_Query
args by attempting to
build each expression term as either a comparison, meta query relation entry or taxonomy query relation entry.
- Required implementations:
_buildWpQueryCompare()
- fulfilled byBuildWpQueryCompareCapableTrait
_buildWpQueryMetaRelation()
- fulfilled indirectly byBuildWpQueryRelationTermCapableTrait
_buildWpQueryTaxTelation()
- fulfilled indirectly byBuildWpQueryRelationTermCapableTrait
BuildWpQueryCompareCapableTrait
:eye: Build Comparison
Provides functionality for building top-level comparison key-value pairs.
- Required implementations:
_getWpQueryCompareKey()
_getWpQueryCompareValue()
- Complements:
BuildWpQueryArgsCapableTrait
BuildWpQueryRelationCapableTrait
:eye: Build Relation
Provides functionality for building relation arrays.
- Required implementations:
_getWpQueryRelationOperator()
- fullfilled byGetWpQueryRelationOperatorCapableTrait
_buildWpQueryRelationTerm()
- fulfilled byBuildWpQueryRelationTermCapableTrait
- Complements:
BuildWpQueryRelationTermCapableTrait
BuildWpQueryRelationTermCapableTrait
:eye: Build Relation Term
Provides functionality for building the terms in a relation array, by delegating building mechanism used depending on the current relation context, i.e. meta_query
relation or tax_query
relation.
- Required implementations:
_buildWpQueryMetaCompare()
- fulfilled byBuildWpQueryMetaCompareCapableTrait
_buildWpQueryTaxCompare()
- fulfilled byBuildWpQueryTaxCompareCapableTrait
- Complements
BuildWpQueryRelationTermCapableTrait
BuildWpQueryMetaCompareCapableTrait
:eye: Build Meta Comparison
Provides functionality for building meta comparison arrays.
- Required implementations:
_getWpQueryMetaCompareKey()
_getWpQueryMetaCompareValue()
_getWpQueryMetaCompareType()
- fulfilled byGetWpQueryMetaCompareTypeCapableTrait
_getWpQueryMetaCompareOperator()
- fulfilled byGetWpQueryMetaCompareOperatorCapableTrait
- Complements:
BuildWpQueryRelationTermCapableTrait
BuildWpQueryTaxCompareCapableTrait
:eye: Build Taxonomy Comparison
Provides functionality for building taxonomy comparison arrays.
- Required implementations:
_getWpQueryTaxCompareTaxonomy()
_getWpQueryTaxCompareField()
_getWpQueryTaxCompareTerms()
_getWpQueryTaxCompareOperator()
- fulfilled byGetWpQueryTaxCompareOperatorCapableTrait
- Complements:
BuildWpQueryRelationTermCapableTrait
GetWpQueryMetaCompareOperatorCapableTrait
:eye: Get Meta Comparison Operator
Provides functionality for resolving the meta comparison compare type from an expression.
- Complements:
BuildWpQueryMetaCompareCapableTrait
GetWpQueryMetaCompareTypeCapableTrait
:eye: Get Meta Comparison Type
Provides functionality for resolving the meta comparison value cast type from an expression.
- Required implementations:
_getWpQueryMetaCompareValue()
- Complements:
BuildWpQueryMetaCompareCapableTrait
GetWpQueryTaxCompareOperatorCapableTrait
:eye: Get Taxonomy Comparison Operator
Provides functionality for resolving the taxonomy comparison operator from an expression.
- Complements:
BuildWpQueryTaxCompareCapableTrait
GetWpQueryRelationOperatorCapableTrait
:eye: Get Relation Operator
Provides functionality for resolving the relation operator ("AND" or "OR") from an expression.
- Complements:
BuildWpQueryRelationCapableTrait
If all of the above traits are brought together, the implementing class is only required to implement the following:
_buildWpQueryMetaRelation()
- recommended to redirect tobuildWpQueryRelation
with a "meta" mode._buildWpQueryTaxRelation()
- recommended to redirect tobuildWpQueryRelation
with a "tax" mode._getWpQueryCompareKey()
- recommended to search the expression for aVariableTermInterface
or anEntityFieldInterface
and retrieve the field._getWpQueryCompareValue()
- recommended to search the expression for aLiteralTermInterface
._getWpQueryMetaCompareKey()
- recommended to search the expression for aVariableTermInterface
or anEntityFieldInterface
and retrieve the field._getWpQueryMetaCompareValue()
- recommended to search the expression for aLiteralTermInterface
._getWpQueryTaxCompareTaxonomy()
- recommended to search the expression for anEntityFieldInterface
and retrieve the entity._getWpQueryTaxCompareField()
- recommended to search the expression for anEntityFieldInterface
and retrieve the field._getWpQueryTaxCompareTerms()
- recommended to search the expression for aLiteralTermInterface
.
All versions of expression-wp-query-builder-abstract with dependencies
dhii/expression-interface Version ^0.2
dhii/sql-interface Version ^0.1