Logo classes.scriptsphp.org PHP

go to nav bar

HelpML

Manipulation de documents HelpML

Cette classe permet de manipuler (créer, modifier, afficher) des documents au format HelpML 0.1 (basé sur XML). Ce format permet essentiellement la création de FAQ.

Les Méthodes

Exemples

  1. Exemple de fichier HelpML
  2. Création d'un document HelpML

Description des Méthodes

Nouvelle Instance

HelpML( [string $HelpMLFile] )

Nouvelle Instance.

  • HelpMLFile : Optionnel. Chemin vers un fichier HelpML à précharger.
  • $HML = new HelpML();
  • $HML = new HelpML('helpMLfile.xml');

go to the top
Fixer l'encodage du document

setEncoding( string $Encoding )

Définie l'encodage du document XML qui sera généré.

  • Encoding : Nouvel encodage.
  • $HML -> setEncoding('UTF-8');

go to the top
Fixer le titre du document

addTitle( string $Title )

Permet de définir ou de modifier le titre principal du document.

  • Title : Nouveau titre.
  • $HML -> addTitle('Ma Faq');

go to the top
Fixer l'URL du document

addURL( string $URL )

Permet de définir ou de modifier l'URL principale du document.

  • URL : Nouvelle URL ou adresse email.
  • $HML -> addURL('http://scriptsphp.org');
  • $HML -> addURL('fabrice@scriptsphp.org');

go to the top
Fixer la description du document

addDescription( string $Description )

Permet de définir ou de modifier la description principale du document.

  • Title : Nouvelle description.
  • $HML -> addDescription('Ma Faq sur le PHP');

go to the top
Ajouter une information sur le format du document

addInfo( string $Information )

Ajoute le tag info (optionnel).

  • Information : Informations sur le format.
  • $HML -> addInfo('This is an HelpML formatted XML document ...');

go to the top
Ajouter un nouveau topic (question)

addTopic( string $Title, string $Keywords, string $Answer [, string $CatID] )

Permet d'ajouter ou de modifier un topic. Chaque topic contient au minimum un titre, des mots clés associés et la réponse. Il peut éventuellement contenir l'id d'une catégorie.

  • Title : Titre du topic.
  • Keywords : Mot clés associés à ce topic.
  • Answer : Réponse au sujet du topic.
  • CatID : Optionnel. La catégorie à laquelle apartient ce topic
  • $HML -> addTopic('C est quoi PHP?', 'PHP langage serveur', 'Google est ton ami');

go to the top
Detruire un topic

unsetTopic( string $Title )

Permet de detruire un topic en fonction de son titre.

  • Title : Titre du topic à detruire.
  • $HML -> unsetTopic('C est quoi PHP?');

go to the top
Ajouter une catégorie

addCatID( string $CatID, string $Name )

Permet de définir ou de modifier une catégorie.

  • CatID : Nouvelle catégorie.
  • Name : Description de la catégorie.
  • $HML -> addCatID('PHP', 'Questions relatives à PHP');

go to the top
Générer le XML

toXML( [string $FileName )

Génère le code de sortie au format HelpML.

  • FileName : Optionnel. Si FileName est spécifié, le fichier correspondant sera (re)généré.
  • $HML -> toXML();
  • $HML -> toXML('mafaq.xml');

go to the top

Merci de ne pas suivre ce lien emails.

0.1204s | «»
PHP powered