public function toPHP($value, Driver $driver)
    {
        if ($value === null) {
            return null;
        }
        if (is_string($value)) {
            return $this->convertBinaryUuidToString($value);
        }
        if (is_resource($value)) {
            return $value;
        }

        throw new Exception(sprintf('Unable to convert %s into binary uuid.', gettype($value)));
    }
public function toPHP($value, Driver $driver)
    {
        if ($value === null) {
            return null;
        }
        if (is_string($value)) {
            return $this->convertBinaryUuidToString($value);
        }
        if (is_resource($value)) {
            return $value;
        }

        throw new Exception(sprintf('Unable to convert %s into binary uuid.', gettype($value)));
    }
public function toPHP ( $ value , Driver $ driver ) { if ( $ value === null ) { return null ; } if ( is_string ( $ value ) ) { return $ this -> convertBinaryUuidToString ( $ value ) ; } if ( is_resource ( $ value ) ) { return $ value ; } throw new Exception ( sprintf ( 'Unable to convert %s into binary uuid.' , gettype ( $ value ) ) ) ; }
Convert binary uuid into resource handles

@param null|string|resource $value The value to convert.
@param \Cake\Database\Driver $driver The driver instance to convert with.
@return resource|string|null
@throws \Cake\Core\Exception\Exception
Convert binary uuid into resource handles