XMLDB XMLDB(
[string
$documentroot = ''], [string
$tableprefix = '']
)
|
|
Constructeur
Parameters:
|
string |
$documentroot: |
l'élement racine |
|
string |
$tableprefix: |
le prefix des tables |
Add attribut First argument is the tablename Others arguments are elements. If argument is an array, it contains the field and the element name.
If argument is a string, both element and field have the same name
Add Element First argument is the tablename Others arguments are elements. If argument is an array, it contains the field and the element name.
If argument is a string, both element and field have the same name
void addHeader(
string
$xml
)
|
|
Définition d'un header XML
Parameters:
|
string |
$xml: |
le header XML |
void addJoin(
string
$tableparent, string
$parentfield, string
$tablechild, string
$childfield
)
|
|
Ajoute une jointure entre une table parent et une table enfant
Parameters:
|
string |
$tableparent: |
nom de la table parente |
|
string |
$parentfield: |
nom du champ parent |
|
string |
$tablechild: |
nom de la table enfant |
|
string |
$childfield: |
nom du champ enfant |
Ajoute une condition where sur une table
void characterData(
object
$parser, string
$data
)
|
|
??
Parameters:
|
object |
$parser: |
|
|
string |
$data: |
|
void endElement(
$parser,
$name
)
|
|
Parameters:
void exporttable(
string
$table, string
$info, [string
$joinfieldvalue = ""]
)
|
|
Exportation d'une table dans le fichier XML
Parameters:
|
string |
$table: |
le nom de la table |
|
string |
$info: |
|
|
string |
$joinfieldvalue: |
|
void insertRow(
$currentable, array
$rows, string
$currenttable
)
|
|
Insertion d'une ligne
Cette fonction est abstraite. Elle doit être définie dans une classe dérivée.
Parameters:
|
string |
$currenttable: |
la table courante |
|
array |
$rows: |
les données à insérer |
|
|
$currentable: |
|
Redefined in descendants as:
void readFromFile(
string
$filename
)
|
|
Lecture d'un fichier XML (depuis un fichier)
Parameters:
|
string |
$filename: |
le fichier contenant le XML |
void readFromString(
string
$xml
)
|
|
Lecture d'un fichier XML (depuis une chaîne)
Parameters:
|
string |
$xml: |
la chaîne contenant le XML |
void saveToFile(
string
$filename
)
|
|
Ecrire le XML dans un fichier
Write the XML into a file
Parameters:
|
string |
$filename: |
le nom du fichier XML |
Ecrire le XML dans une chaine de caractère
API Tags:
void setRowtag(
string
$table, string
$rowtag
)
|
|
Définit un tag pour une ligne
Parameters:
|
string |
$table: |
le nom de la table |
|
string |
$rowtag: |
?? |
void startElement(
$parser,
$name,
$attrs
)
|
|
Parameters:
API Tags:
| Internal: | XML Parser handler |
void _endrecord(
string
$name
)
|
|
Parameters:
|
string |
$name: |
fin de l'enregistrement |
API Tags:
Initialisation du parser XML
API Tags:
void _newrecord(
string
$name
)
|
|
Parameters:
|
string |
$name: |
nom du nouvel enregistrement |
API Tags:
void _write(
string
$string
)
|
|
Ecriture d'une chaine dans le fichier XML
generic output function
Parameters:
|
string |
$string: |
la chaîne à écrire |
API Tags: