Class RuleContext

Description

Contains the informational context for the execution of a Rule. this information as a collection of RuleElements that may be Propositions or Variables but not Operators.

Contains the informational context for the execution of a Rule. It represents this information as a collection of RuleElements that may be Propositions or Variables but not Operators.

Located in /Rulecontext.php (line 15)


	
			
Variable Summary
mixed $elements
mixed $name
Method Summary
RuleContext __construct ([ $name = ''])
RuleContext RuleContext ([ $name = ''])
void addProposition (string $statement, boolean $value)
void addVariable (string $name, mixed $value)
void append ( $ruleContext)
RuleElement findElement (string $name)
string toString ()
Variables
mixed $elements (line 17)
  • access: public
mixed $name (line 16)
  • access: public
Methods
Constructor __construct (line 27)
RuleContext __construct ([ $name = ''])
  • $name
Constructor RuleContext (line 19)
RuleContext RuleContext ([ $name = ''])
  • $name
addProposition (line 40)

Adds a Proposition to the array of $elements.

Adds a Proposition to the array of $elements.

  • access: public
void addProposition (string $statement, boolean $value)
  • string $statement: The Proposition's statement.
  • boolean $value: Whether the Proposition is TRUE or FALSE.
addVariable (line 49)

Adds a Variable to the array of $elements.

Adds a Variable to the array of $elements.

  • access: public
void addVariable (string $name, mixed $value)
  • string $name: The Variable's name.
  • mixed $value: The Variable's value.
append (line 62)
void append ( $ruleContext)
  • $ruleContext
findElement (line 58)

Find and return a RuleElement by name, if it exists.

Find and return a RuleElement by name, if it exists.

  • access: public
RuleElement findElement (string $name)
  • string $name: The name (i.e., "key") of the RuleElement.
toString (line 72)

Returns an infixed, readable representation of the RuleContext.

Returns an infixed, readable representation of the RuleContext.

  • access: public
string toString ()

Documentation generated on Thu, 24 Mar 2011 21:27:40 -0500 by phpDocumentor 1.4.1