mName=$name; if (!is_scalar($value)) error('Expected $value to be a scalar, ' . gettype($value) . ' given'); $this->mValue=$value; for ($i=0; $imFilters[]=&$filters[$i]; } } /** * Get event name * * Returns the name of the event (most of the time the name of the filtered * key of the array) * * @access public * @return scalar */ function Name() { return $this->mName; } /** * Get event value * * Returns the value which has been passed to the filters * * @access public * @return scalar */ function Value() { return $this->mValue; } /** * Get computed impact * * Returns the overal impact of all filters * * @access public * @return integer */ function Impact() { if (is_null($this->mImpact)) { $this->mImpact=0; for ($i=0; $imFilters); $i++) { $this->mImpact+=$this->mFilters[$i]->Impact(); } } return $this->mImpact; } /** * Get assembled tags * * Collects all the tags of the filters * * @access public * @return array */ function Tags() { if (is_null($this->mTags)) { $this->mTags=array(); for ($i=0; $imFilters); $i++) { $this->mTags=array_merge($this->mTags, $this->mFilters[$i]->Tags()); } $this->mTags=array_values(array_unique($this->mTags)); } return $this->mTags; } /** * Get list of filters * * @access public * @return array */ function Filters() { return $this->mFilters; } /** * Get number of filters * * @access public * @return integer */ function Count() { return count($this->mFilters); } } ?>