Download the PHP package rebelcode/expression-wp-query-builder without Composer
On this page you can find all versions of the php package rebelcode/expression-wp-query-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rebelcode/expression-wp-query-builder
More information about rebelcode/expression-wp-query-builder
Files in rebelcode/expression-wp-query-builder
Package expression-wp-query-builder
Short Description Abstract functionality for building WP_Query args using expressions.
License GPL-3.0
Informations about the package expression-wp-query-builder
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 tobuildWpQueryRelationwith a "meta" mode._buildWpQueryTaxRelation()- recommended to redirect tobuildWpQueryRelationwith a "tax" mode._getWpQueryCompareKey()- recommended to search the expression for aVariableTermInterfaceor anEntityFieldInterfaceand retrieve the field._getWpQueryCompareValue()- recommended to search the expression for aLiteralTermInterface._getWpQueryMetaCompareKey()- recommended to search the expression for aVariableTermInterfaceor anEntityFieldInterfaceand retrieve the field._getWpQueryMetaCompareValue()- recommended to search the expression for aLiteralTermInterface._getWpQueryTaxCompareTaxonomy()- recommended to search the expression for anEntityFieldInterfaceand retrieve the entity._getWpQueryTaxCompareField()- recommended to search the expression for anEntityFieldInterfaceand retrieve the field._getWpQueryTaxCompareTerms()- recommended to search the expression for aLiteralTermInterface.
All versions of expression-wp-query-builder with dependencies
dhii/expression-interface Version ^0.2
dhii/sql-interface Version ^0.1