root/trunk/examples/Test__setPublicProperties.php

Revision 129, 0.8 kB (checked in by mikey, 10 months ago)

renamed XJConfLoader to XJConf

Line 
1 <?php
2 require_once '../XJConf/XJConf.php';
3 use net::xjconf::DefinitionParser;
4 use net::xjconf::XmlParser;
5 error_reporting(E_ALL | E_STRICT);
6
7 require 'AnotherDog.php';
8
9 /**
10  * @author  Frank Kleine <mikey@xjconf.net>
11  */
12 class Test__setPublicProperties
13 {
14
15     public static function main()
16     {
17
18         $tagParser = new DefinitionParser();
19         $defs = $tagParser->parse(getcwd() . '/xml/defines-__setPublicProperties.xml');
20
21         $conf = new XmlParser();
22         $conf->setTagDefinitions($defs);
23
24         try {
25             $conf->parse(getcwd() . '/xml/test-__set.xml');
26         } catch (Exception $e) {
27             throw $e;
28             exit();
29         }
30
31         $dog = $conf->getConfigValue('dog');
32         var_dump($dog);
33     }
34 }
35 Test__setPublicProperties::main();
36 ?>
Note: See TracBrowser for help on using the browser.