Check that a single URI/property parameter (not a property path) is valid, and expand it if required @ignore
protected function checkSinglePropertyParam(&$property, &$inverse) {
if (is_object($property) and $property instanceof EasyRdf_Resource) {
$property = $property
->getUri();
}
elseif (is_object($property) and $property instanceof EasyRdf_ParsedUri) {
$property = strval($property);
}
elseif (is_string($property)) {
if ($property == '') {
throw new InvalidArgumentException("\$property cannot be an empty string");
}
elseif (substr($property, 0, 1) == '^') {
$inverse = true;
$property = EasyRdf_Namespace::expand(substr($property, 1));
}
elseif (substr($property, 0, 2) == '_:') {
throw new InvalidArgumentException("\$property cannot be a blank node");
}
else {
$inverse = false;
$property = EasyRdf_Namespace::expand($property);
}
}
if ($property === null or !is_string($property)) {
throw new InvalidArgumentException("\$property should be a string or EasyRdf_Resource and cannot be null");
}
}