src/FilterFactory.php
public function create( $type, array $properties = [ ] ) {

		$type = (string) $type;

		if ( isset( $this->classes[ $type ] ) ) {
			$class = $this->classes[ $type ];

			return new $class( $properties );
		} else if ( class_exists( $type ) ) {
			$class = new $type( $properties );
			if ( $class instanceof FilterInterface ) {

				return $class;
			}
		}

		throw new Exception\InvalidArgumentException(
			sprintf(
				'The given class <code>%s</code> does not exists.',
				$type
			)
		);

	}
public function create( $type, array $properties = [ ] ) {

		$type = (string) $type;

		if ( isset( $this->classes[ $type ] ) ) {
			$class = $this->classes[ $type ];

			return new $class( $properties );
		} else if ( class_exists( $type ) ) {
			$class = new $type( $properties );
			if ( $class instanceof FilterInterface ) {

				return $class;
			}
		}

		throw new Exception\InvalidArgumentException(
			sprintf(
				'The given class <code>%s</code> does not exists.',
				$type
			)
		);

	}
public function create ( $ type , array $ properties = [ ] ) { $ type = ( string ) $ type ; if ( isset ( $ this -> classes [ $ type ] ) ) { $ class = $ this -> classes [ $ type ] ; return new $ class ( $ properties ) ; } else if ( class_exists ( $ type ) ) { $ class = new $ type ( $ properties ) ; if ( $ class instanceof FilterInterface ) { return $ class ; } } throw new Exception \ InvalidArgumentException ( sprintf ( 'The given class <code>%s</code> does not exists.' , $ type ) ) ; }
Creates and returns a new filter instance of the given type.

@param       $type
@param array $properties

@throws Exception\InvalidArgumentException if Filter of given $type is not found.

@return FilterInterface
Creates and returns a new filter instance of the given type .