src/core/framework/core/3rdparty/dwoo/Dwoo.php
public function addFilter($callback, $autoload = false)
	{
		if ($autoload) {
			$class = 'Dwoo_Filter_'.$callback;

			if (!class_exists($class, false) && !function_exists($class)) {
				try {
					$this->getLoader()->loadPlugin($callback);
				} catch (Dwoo_Exception $e) {
					if (strstr($callback, 'Dwoo_Filter_')) {
						throw new Dwoo_Exception('Wrong filter name : '.$callback.', the "Dwoo_Filter_" prefix should not be used, please only use "'.str_replace('Dwoo_Filter_', '', $callback).'"');
					} else {
						throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"');
					}
				}
			}

			if (class_exists($class, false)) {
				$callback = array(new $class($this), 'process');
			} elseif (function_exists($class)) {
				$callback = $class;
			} else {
				throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"');
			}

			$this->filters[] = $callback;
		} else {
			$this->filters[] = $callback;
		}
	}
public function addFilter($callback, $autoload = false)
	{
		if ($autoload) {
			$class = 'Dwoo_Filter_'.$callback;

			if (!class_exists($class, false) && !function_exists($class)) {
				try {
					$this->getLoader()->loadPlugin($callback);
				} catch (Dwoo_Exception $e) {
					if (strstr($callback, 'Dwoo_Filter_')) {
						throw new Dwoo_Exception('Wrong filter name : '.$callback.', the "Dwoo_Filter_" prefix should not be used, please only use "'.str_replace('Dwoo_Filter_', '', $callback).'"');
					} else {
						throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"');
					}
				}
			}

			if (class_exists($class, false)) {
				$callback = array(new $class($this), 'process');
			} elseif (function_exists($class)) {
				$callback = $class;
			} else {
				throw new Dwoo_Exception('Wrong filter name : '.$callback.', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"');
			}

			$this->filters[] = $callback;
		} else {
			$this->filters[] = $callback;
		}
	}
public function addFilter ( $ callback , $ autoload = false ) { if ( $ autoload ) { $ class = 'Dwoo_Filter_' . $ callback ; if ( ! class_exists ( $ class , false ) && ! function_exists ( $ class ) ) { try { $ this -> getLoader ( ) -> loadPlugin ( $ callback ) ; } catch ( Dwoo_Exception $ e ) { if ( strstr ( $ callback , 'Dwoo_Filter_' ) ) { throw new Dwoo_Exception ( 'Wrong filter name : ' . $ callback . ', the "Dwoo_Filter_" prefix should not be used, please only use "' . str_replace ( 'Dwoo_Filter_' , '' , $ callback ) . '"' ) ; } else { throw new Dwoo_Exception ( 'Wrong filter name : ' . $ callback . ', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"' ) ; } } } if ( class_exists ( $ class , false ) ) { $ callback = array ( new $ class ( $ this ) , 'process' ) ; } elseif ( function_exists ( $ class ) ) { $ callback = $ class ; } else { throw new Dwoo_Exception ( 'Wrong filter name : ' . $ callback . ', when using autoload the filter must be in one of your plugin dir as "name.php" containg a class or function named "Dwoo_Filter_name"' ) ; } $ this -> filters [ ] = $ callback ; } else { $ this -> filters [ ] = $ callback ; } }
adds a filter to this Dwoo instance, it will be used to filter the output of all the templates rendered by this instance

@param mixed $callback a callback or a filter name if it is autoloaded from a plugin directory
@param bool $autoload if true, the first parameter must be a filter name from one of the plugin directories
adds a filter to this Dwoo instance it will be used to filter the output of all the templates rendered by this instance