SourceForge.net LogoPHPGallue
[ class tree: libbase ] [ index: libbase ] [ all elements ]

Class: GALExpression

Source Location: /libbase/logexpr.inc.php

Class Overview


Some generic methods in logical expressions.


Author(s):

Methods


Child classes:

GALExpressionCompare
Creates SQL comparison strings.
GALExpressionList
Creates SQL strings that check if a set of fields equals to one tuple of the passed list of value tuples.
GALExpressionTRUE
The TRUE constant.
GALExpressionFALSE
The FALSE constant.
GALExpressionAND
The AND operator.
GALExpressionOR
The OR operator.
GALExpressionNOT
The NOT operator.
GALExpressionRaw
User defined SQL logical expression.

Class Details

[line 44]
Some generic methods in logical expressions.



Tags:

abstract:  


[ Top ]


Class Methods


method eand [line 56]

GALExpressionAND eand( GALExpression $cond)

Connect two or more statements with AND.

This method supports strings as arguments; they are implicitly converted to a GALExpressionRaw. As the AND operator is binary, multiple operands are recursively treated by building a chain connected by AND, i.e. ((((A) AND (B)) AND (C)) AND (D)). The e is added to eand() to avoid a conflict with PHP syntax.




Tags:

return:  First element of a a chain of GALExpressionAND objects.
access:  public


Parameters:

GALExpression   $cond   The first condition. It might also be a string.

[ Top ]

method enot [line 105]

GALExpressionNOT enot( )

Invert this logical expression.

GALExpressionNOT just adds a "( NOT ($condition))". The e is added to enot() to avoid a conflict with PHP syntax.




Tags:

return:  The inverse of this object.


[ Top ]

method eor [line 83]

GALExpressionOR eor( GALExpression $cond)

Connect two or more statements with OR.

This method supports strings as arguments; they are implicitly converted to a GALExpressionRaw. As the OR operator is binary, multiple operands are recursively treated by building a chain connected by OR, i.e. ((((A) OR (B)) OR (C)) OR (D)). The e is added to eor() to avoid a conflict with PHP syntax.




Tags:

return:  First element of a a chain of GALExpressionOR objects.


Parameters:

GALExpression   $cond   The first condition. It might also be a string.

[ Top ]

method __toString [line 114]

string __toString( )

String representation of this logical expression.

In child classes this method returns a string representation that can be inserted directly into a SQL query.




Tags:

return:  SQL logical expression.
access:  public
abstract:  


Overridden in child classes as:

GALExpressionCompare::__toString()
SQL string representation of the comparison expression.
GALExpressionList::__toString()
SQL string representation of the expression.
GALExpressionTRUE::__toString()
GALExpressionFALSE::__toString()
GALExpressionAND::__toString()
SQL string representation of this logical expression.
GALExpressionOR::__toString()
SQL string representation of this logical expression.
GALExpressionNOT::__toString()
SQL string representation of this logical expression.
GALExpressionRaw::__toString()
Returns the string value of the condition in brackets.

[ Top ]


Documentation generated on Wed, 16 Aug 2006 15:36:19 +0200 by phpDocumentor 1.3.0RC6