Source for file Rulecontext.php
Documentation is available at Rulecontext.php
<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');
* @author Greg Swindle <greg@swindle.net>
require_once( "Ruleelement.php" );
* 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.
// elements is a dictionary - a set of {name, value} pairs
// The names are Proposition or Variable names and
// the values are the Propositions or Variables themselves
// elements is a dictionary - a set of {name, value} pairs
// The names are Proposition or Variable names and
// the values are the Propositions or Variables themselves
* Adds a Proposition to the array of {@link $elements}.
* @param string $statement The Proposition's statement.
* @param boolean $value Whether the Proposition is TRUE or FALSE.
* Adds a Variable to the array of {@link $elements}.
* @param string $name The Variable's name.
* @param mixed $value The Variable's value.
* Find and return a RuleElement by name, if it exists.
* @param string $name The name (i.e., "key") of the RuleElement.
function append( $ruleContext ) {
foreach( $ruleContext->elements as $e ) {
* Returns an infixed, readable representation of the RuleContext.
$result =
$result .
$e->toString() .
"\n";
/* End of file Rulecontext.php */
/* Location: ./system/application/libraries/php-rules/Rulecontext.php */
Documentation generated on Thu, 24 Mar 2011 21:27:40 -0500 by phpDocumentor 1.4.1