Bonjour a tous!

Je dois faire une migration php4 vers php5 et j'ai un petit souci de lecture du code je ne le comprends pas trop si quelqu'un pourrait me l'expliquer car ce n'est pas moi qui l'ai écrit et niveau doc c'est proche du néant.

c'est une application web qui permet de convertir un fichier texte non structuré en un fichier xml structuré.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
   if (is_file($this->filePath . '\\'. $this->xmlFile)) unlink($this->filePath . '\\'. $this->xmlFile);
	if (is_file($this->filePath . '\\'. $this->htmFile)) unlink($this->filePath . '\\'. $this->htmFile);
	$this->flgError = false ;
	$this->libError = '' ;
	$this->nbError = 0 ;
	$this->nbOrder = 0;
   	$this->flgGenerateFile = false ; //Mis à vrai si au moins 1 commande à générer
   	$this->VerifFile();
	if ($this->flgGenerateFile) {
	    if (!$this->TextToXml()) {
	    	$xsldoc = domxml_xslt_stylesheet_file($this->filePath . '\\'. $this->xslFile);
	    	$this->xmlDom = domxml_open_file($this->filePath . '\\'. $this->xmlFile);
	    	$result =  $xsldoc->process($this->xmlDom);
	    	$xsldoc->result_dump_file($result,$this->filePath . '\\'. $this->htmFile);
	    }
	}
    //delete of temporary file
  	if (is_file($this->workFile)) unlink($this->workFile);
}
le souci c'est surtout à partir de if ($this->flgGenerateFile)
Merci d'avance
Rokhanjb