public function insertSuperUser(array $userData){

		if (empty($userData['login']) || empty($userData['password'])){
			throw new tao_install_utils_Exception("To create a super user you must provide at least a login and a password");
		}

		$superUserOntology = dirname(__FILE__) . "/../ontology/superuser.rdf";

		if (!@is_readable($superUserOntology)){
			throw new tao_install_utils_Exception("Unable to load ontology : ${superUserOntology}");
		}

		$doc = new DOMDocument();
		$doc->load($superUserOntology);

		foreach ($userData as $key => $value){
			$tags = $doc->getElementsByTagNameNS('http://www.tao.lu/Ontologies/generis.rdf#', $key);
			foreach ($tags as $tag){
				$tag->appendChild($doc->createCDATASection($value));
			}
		}
		return $this->insertLocalModel($doc->saveXML());
	}
public function insertSuperUser(array $userData){

		if (empty($userData['login']) || empty($userData['password'])){
			throw new tao_install_utils_Exception("To create a super user you must provide at least a login and a password");
		}

		$superUserOntology = dirname(__FILE__) . "/../ontology/superuser.rdf";

		if (!@is_readable($superUserOntology)){
			throw new tao_install_utils_Exception("Unable to load ontology : ${superUserOntology}");
		}

		$doc = new DOMDocument();
		$doc->load($superUserOntology);

		foreach ($userData as $key => $value){
			$tags = $doc->getElementsByTagNameNS('http://www.tao.lu/Ontologies/generis.rdf#', $key);
			foreach ($tags as $tag){
				$tag->appendChild($doc->createCDATASection($value));
			}
		}
		return $this->insertLocalModel($doc->saveXML());
	}
public function insertSuperUser ( array $ userData ) { if ( empty ( $ userData [ 'login' ] ) || empty ( $ userData [ 'password' ] ) ) { throw new tao_install_utils_Exception ( "To create a super user you must provide at least a login and a password" ) ; } $ superUserOntology = dirname ( __FILE__ ) . "/../ontology/superuser.rdf" ; if ( ! @ is_readable ( $ superUserOntology ) ) { throw new tao_install_utils_Exception ( "Unable to load ontology : ${superUserOntology}" ) ; } $ doc = new DOMDocument ( ) ; $ doc -> load ( $ superUserOntology ) ; foreach ( $ userData as $ key => $ value ) { $ tags = $ doc -> getElementsByTagNameNS ( 'http://www.tao.lu/Ontologies/generis.rdf#' , $ key ) ; foreach ( $ tags as $ tag ) { $ tag -> appendChild ( $ doc -> createCDATASection ( $ value ) ) ; } } return $ this -> insertLocalModel ( $ doc -> saveXML ( ) ) ; }
Specifiq method to insert the super user model,
by using a template RDF file
@param array $userData
Specifiq method to insert the super user model by using a template RDF file