examples/01-blog/Blog/Type/Scalar/UrlType.php
public function parseValue($value)
    {
        if (!is_string($value) || !filter_var($value, FILTER_VALIDATE_URL)) { // quite naive, but after all this is example
            throw new Error("Cannot represent value as URL: " . Utils::printSafe($value));
        }
        return $value;
    }
public function parseValue($value)
    {
        if (!is_string($value) || !filter_var($value, FILTER_VALIDATE_URL)) { // quite naive, but after all this is example
            throw new Error("Cannot represent value as URL: " . Utils::printSafe($value));
        }
        return $value;
    }
public function parseValue ( $ value ) { if ( ! is_string ( $ value ) || ! filter_var ( $ value , FILTER_VALIDATE_URL ) ) { // quite naive, but after all this is example throw new Error ( "Cannot represent value as URL: " . Utils :: printSafe ( $ value ) ) ; } return $ value ; }
Parses an externally provided value (query variable) to use as an input

@param mixed $value
@return mixed
@throws Error
Parses an externally provided value ( query variable ) to use as an input