public function filter($value)
    {
        $filtered = null;
        if (!$this->validate($value, $filtered))
        {
            throw new \InvalidArgumentException(
                "Not a valid value for " . $this->__toString() . ": " . WF::str($value)
            );
        }

        return $filtered;
    }
public function filter($value)
    {
        $filtered = null;
        if (!$this->validate($value, $filtered))
        {
            throw new \InvalidArgumentException(
                "Not a valid value for " . $this->__toString() . ": " . WF::str($value)
            );
        }

        return $filtered;
    }
public function filter ( $ value ) { $ filtered = null ; if ( ! $ this -> validate ( $ value , $ filtered ) ) { throw new \ InvalidArgumentException ( "Not a valid value for " . $ this -> __toString ( ) . ": " . WF :: str ( $ value ) ) ; } return $ filtered ; }
Return a properly typed value

@param mixed $value The value to match and correct
@return mixed The filtered value
@throws InvalidArgumentException When the value is incompatible
Return a properly typed value