rn7.net/wiki

WikiSem

PagePrincipale :: rn7.net :: DerniersChangements :: DerniersCommentaires :: ParametresUtilisateur :: Vous êtes 38.107.179.228

WikiSem code "Orandre"


Liste des micro-fonctionnalités :

à intégrer
<?php


/**
 * Return the URL where to modify the statement
 * Example :
 * "http://example.org/?s=http://example.org/foo#bar+http://example.org/bar#foo+.......
 *
 * @acces public
 * @param object Statement $statement
 * @return string $return
 */
function URL2ModifyStatement($statement)
{
	$s = $statement->getSubject();
	$p = $statement->getPredicate();
	$o = $statement->getObject();
	// Path
	//$return = 
	// ...
	$return .= $s->getURI() . "+" . $p->getURI() . "+" . $this->getObjectHash($o);
	return $return;
}


/**
 * Return the minimal string to identify a object
 * Examples :
 * -- "http://example.org/foo#bar" if the object is an object
 * -- "hj4ds5q38aze64683ss6df656dddaa55.L.fr" if the object is a literal
 *
 * @acces public
 * @param object Object $resource
 * @return string $return
 */
function getObjectHash($resource)
{
	if(is_a($resource, "Literal") return md5($resource->getLabel() . ".L" . $lang;
	else return $resource->getURI();
}

?>

Il n'y a pas de commentaire sur cette page. [Afficher commentaires/formulaire]