src/Alg/Validation/PredicateValidator.php
public function validate( $value, $predicate, $argument = NULL )
	{
		if( !method_exists( $this->validator, $predicate ) )
			throw new BadMethodCallException( 'Predicate "'.$predicate.'" is not defined.' );
		try
		{
			return $this->validator->$predicate( $value, $argument );
		}
		catch( InvalidArgumentException $e )
		{
			return false;
		}
		catch( Exception $e )
		{
			throw $e;
		}
	}
public function validate( $value, $predicate, $argument = NULL )
	{
		if( !method_exists( $this->validator, $predicate ) )
			throw new BadMethodCallException( 'Predicate "'.$predicate.'" is not defined.' );
		try
		{
			return $this->validator->$predicate( $value, $argument );
		}
		catch( InvalidArgumentException $e )
		{
			return false;
		}
		catch( Exception $e )
		{
			throw $e;
		}
	}
public function validate ( $ value , $ predicate , $ argument = NULL ) { if ( ! method_exists ( $ this -> validator , $ predicate ) ) throw new BadMethodCallException ( 'Predicate "' . $ predicate . '" is not defined.' ) ; try { return $ this -> validator -> $ predicate ( $ value , $ argument ) ; } catch ( InvalidArgumentException $ e ) { return false ; } catch ( Exception $ e ) { throw $ e ; } }
Indicates whether a String validates against a Predicate.
@access		public
@param		string		$value		String to be checked
@param		string		$predicate	Method Name of Predicate
@param		string		$argument	Argument for Predicate
@return		bool
Indicates whether a String validates against a Predicate .