index.php
18499246
 <?php
 
3c27a3e7
 require_once "Restaurant.php";
 require_once "Output.php";
 require_once "Parser.php";
5ebc7ae3
 
e421c421
 require_once "restaurants/Pulitzer.php";
 require_once "restaurants/Twenties.php";
78643a89
 
e421c421
 define('CONFIG_FILE', 'config.ini');
78643a89
 
5ebc7ae3
 $data = parse_ini_file(CONFIG_FILE);
 $outputType = ucfirst($data['output']);
 $outputClass = sprintf('%sOutput', $outputType);
 
 require_once sprintf("outputs/%s.php", $outputClass);
 $output = new $outputClass();
 
e421c421
 $restaurants[] = new Pulitzer();
 $restaurants[] = new Twenties();
 
 #todo http://www.irish-pub.sk/sk/denne-menu
 #todo http://www.mexicana.sk/dennemenu_sk.htm
 
 $parser = new Parser($output, $restaurants);
78643a89
 $parser->parse();
e421c421
 
 $output->display();