getFilters() as $filter) { if(is_null($previousOutput)) { // First filter $previousOutput =& $input; } $output = $filter->execute($previousOutput); // Propagate errors of sub-filters (if any) foreach($filter->getErrors() as $errorMessage) $this->addError($errorMessage); // If one filter returns null then we'll abort // execution of the filter chain. if (is_null($output)) break; unset($previousOutput); $previousOutput = $output; } return $output; } } ?>