src/POData/Providers/Metadata/Type/Binary.php
/**
     * Validate a value in Astoria uri is in a format for this type
     * Note: implementation of IType::validate
     * 
     * @param string $value     The value to validate 
     * @param string &$outValue The stripped form of $value that can 
     *                          be used in PHP expressions
     * 
     * @return boolean
     */
Validate a value in Astoria uri is in a format for this type
Note: implementation of IType::validate

@param string $value     The value to validate
@param string &$outValue The stripped form of $value that can
be used in PHP expressions

@return boolean
Validate a value in Astoria uri is in a format for this type Note : implementation of IType :: validate @param string $value The value to validate @param string &$outValue The stripped form of $value that can be used in PHP expressions @return boolean
public function validate($value, &$outValue)
    {
        $length = strlen($value);
        if ((strpos($value, 'binary\'') === 0) && ($length > 7)) {
            $value = substr($value, 7, $length - 7);
            $length -= 7;
        } else if ((strpos($value, 'X\'') === 0 
            || strpos($value, 'x\'') === 0) && ($length > 2)
        ) {
            $value = substr($value, 2, $length - 2);
            $length -= 2;
        } else {
            return false;
        }
        if ($value[$length - 1] != '\'') {
            return false;    
        }
        $value = rtrim($value, "'");
        if (!self::validateWithoutPrefix($value, $outValue)) {
            $outValue = null;
            return false;
        }
        return true;
    }
public function validate ( $ value , & $ outValue ) { $ length = strlen ( $ value ) ; if ( ( strpos ( $ value , 'binary\'' ) === 0 ) && ( $ length > 7 ) ) { $ value = substr ( $ value , 7 , $ length - 7 ) ; $ length -= 7 ; } else if ( ( strpos ( $ value , 'X\'' ) === 0 || strpos ( $ value , 'x\'' ) === 0 ) && ( $ length > 2 ) ) { $ value = substr ( $ value , 2 , $ length - 2 ) ; $ length -= 2 ; } else { return false ; } if ( $ value [ $ length - 1 ] != '\'' ) { return false ; } $ value = rtrim ( $ value , " ' " ) ; if ( ! self :: validateWithoutPrefix ( $ value , $ outValue ) ) { $ outValue = null ; return false ; } return true ; }
Validate a value in Astoria uri is in a format for this type
 Note: implementation of IType::validate
Validate a value in Astoria uri is in a format for this type Note : implementation of IType :: validate