PHP Classes

File: model/XMLFileModel.php

Recommend this page to a friend!
  Classes of stefan   PHP XML Converter   model/XMLFileModel.php   Download  
File: model/XMLFileModel.php
Role: Class source
Content type: text/plain
Description: Class source
Class: PHP XML Converter
Transform Indesign to eBundesanzeiger XML format
Author: By
Last change:
Date: 1 year ago
Size: 1,038 bytes
 

Contents

Class file image Download
<?php
require_once './classes/fileparser.php';
require_once
'./classes/XMLTransformer.php';
require_once
'./classes/XMLProcessor.php';


/**
 * Klasse für den Datenzugriff
 */
class XMLFileModel{
        private static
$directory = "./xml_data/input/";
        private static
$xmlparser;

       
       
    public static function
getXMLfiles(){
           
$handle = opendir(self::$directory);
            if (
$handle) {
               
               
$i = 0;
                while (
false !== ($file = readdir($handle))) {
                    if(
FileParser::getExtension($file)=="xml") {
                       
$filenames[$i] = $file;
                    }
                   
$i++;
                   
                }
               
asort($filenames);
               
        return
$filenames;
            }
        }
       
        public static function
readxml($filename) {
   
XMLProcessor::init();
   
XMLTransformer::getXMLdata($filename);
        return
XMLProcessor::output();
}


}
?>