Overview

Namespaces

  • Webmozart
    • Expression
      • Constraint
      • Logic
      • PhpUnit
      • Selector
      • Traversal
      • Util

Classes

  • AlwaysFalse
  • AlwaysTrue
  • Conjunction
  • Disjunction
  • Literal
  • Not
  • Overview
  • Namespace
  • Class

Class Conjunction

A disjunction of expressions.

A disjunction is a set of Webmozart\Expression\Expression instances connected by logical "and" operators.

Webmozart\Expression\Logic\Conjunction implements Webmozart\Expression\Expression
Final
Namespace: Webmozart\Expression\Logic
Author: Bernhard Schussek bschussek@gmail.com
Since: 1.0
Located at Logic/Conjunction.php
Methods summary
public
# __construct( array $conjuncts = array() )

Creates a conjunction of the given expressions.

Creates a conjunction of the given expressions.

Parameters

$conjuncts
The conjuncts.
public Webmozart\Expression\Expression[]
# getConjuncts( )

Returns the conjuncts of the conjunction.

Returns the conjuncts of the conjunction.

Returns

Webmozart\Expression\Expression[]
The conjuncts.
public
# andX( Webmozart\Expression\Expression $expr )
public
# andNot( Webmozart\Expression\Expression $expr )
public
# andTrue( )
public
# andFalse( )
public
# andKey( $keyName, Webmozart\Expression\Expression $expr )
public
# andMethod( $methodName, $args )
public
# andProperty( $propertyName, Webmozart\Expression\Expression $expr )
public
# andAtLeast( $count, Webmozart\Expression\Expression $expr )
public
# andAtMost( $count, Webmozart\Expression\Expression $expr )
public
# andExactly( $count, Webmozart\Expression\Expression $expr )
public
# andAll( Webmozart\Expression\Expression $expr )
public
# andCount( Webmozart\Expression\Expression $expr )
public
# andNull( )
public
# andNotNull( )
public
# andEmpty( )
public
# andNotEmpty( )
public
# andInstanceOf( $className )
public
# andEquals( $value )
public
# andNotEquals( $value )
public
# andSame( $value )
public
# andNotSame( $value )
public
# andGreaterThan( $value )
public
# andGreaterThanEqual( $value )
public
# andLessThan( $value )
public
# andLessThanEqual( $value )
public
# andIn( array $values )
public
# andMatches( $regExp )
public
# andStartsWith( $prefix )
public
# andEndsWith( $suffix )
public
# andContains( $string )
public
# andKeyExists( $keyName )
public
# andKeyNotExists( $keyName )
public boolean
# evaluate( mixed $values )

Evaluates the expression with the given value.

Evaluates the expression with the given value.

Parameters

$values
$value A value.

Returns

boolean

Returns true if the value satisfies the expression and false otherwise.

Implementation of

Webmozart\Expression\Expression::evaluate()
public boolean
# equivalentTo( Webmozart\Expression\Expression $other )

Returns whether this expression is logically equivalent to another expression.

Returns whether this expression is logically equivalent to another expression.

Parameters

$other
Some expression.

Returns

boolean

Returns true if the expressions are logically equivalent and false otherwise.

Implementation of

Webmozart\Expression\Expression::equivalentTo()
public string
# toString( )

Returns a string representation of the expression.

Returns a string representation of the expression.

Returns

string
The expression as string.

Implementation of

Webmozart\Expression\Expression::toString()
public
# __toString( )
Webmozart Expression API API documentation generated by ApiGen