Source for file Filter.class.php
Documentation is available at Filter.class.php
* Gumbo Library Framework
* This library is being released under the terms of the New BSD License. A
* copy of the license is packaged with the software (LICENSE.txt). If no
* copy is found, a copy of the license template can be found at:
* http://www.opensource.org/licenses/bsd-license.php
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
* This class is responsible for loading the appropriate Filter object. The name
* given must be a Gumbo_Interface_Filter, otherwise the returned value will be
* the Blank Filter. The Blank Filter simply returns the data given. If the
* name given is not a class, the Factory will attempt to search for a Gumbo_Filter_*
* class. Since the Factory will always return a Filter object, it can used as:
* $data = $fact->factory ("Tags", ... )->run ($data);
* @copyright Copyright (c) 2007, iBayou, Michael Luster
* @license http://www.opensource.org/licenses/bsd-license.php New BSD License
* @author Michael Luster <mluster79@yahoo.com>
* @link http://sourceforge.net/projects/phpgumbo
gumbo_load ("Filter_Blank");
* Returns an instantiated object (accepts Constructor arguments)
* @param string $name name of Class or key string
* @param mixed $args additional arguments
* @return Gumbo_Interface_Filter
* @throws Gumbo_Exception
* @uses Gumbo_Filter_Blank
public function factory ($name=
null, $args=
null) {
// prepend Gumbo_Filter_ if class does not exist
if ($key ==
0) { continue; }
$e->setFunction (__METHOD__
);