root/branches/PRE_NAMESPACES/build.php

Revision 139, 1.0 kB (checked in by mikey, 5 months ago)

bugfix: throw exception if opening of xml files fails

Line 
1 <?php
2 require 'star/starWriter.php';
3 $starArchive = new StarArchive(new StarWriter('build/xjconf.star'));
4 $dirIt       = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('XJConf'));
5 $removePath  = dirname(__FILE__);
6 foreach ($dirIt as $file) {
7     if ($file->isFile() == false || substr($file->getPathname(), -4) != '.php') {
8         continue;
9     }
10     
11     
12     $fqClassName = str_replace('/', '::', str_replace('XJConf/', 'net/xjconf/', str_replace(DIRECTORY_SEPARATOR, '/', str_replace('.php', '', $file->getPathname()))));
13     $starArchive->add(new StarFile($file->getPathname(), $removePath), $fqClassName);
14 }
15 $starArchive->addMetaData('title', 'XJConf for PHP');
16 $starArchive->addMetaData('package', 'net::xjconf');
17 $starArchive->addMetaData('version', '0.3.0dev');
18 $starArchive->addMetaData('author', 'XJConf Development Team <http://php.xjconf.net>');
19 $starArchive->addMetaData('copyright', '(c) 2007-2008 XJConf Development Team');
20 $starArchive->create();
21 ?>
Note: See TracBrowser for help on using the browser.