root/tags/RELEASE_0_2_1/examples/Test__setImplicit.php

Revision 103, 0.8 kB (checked in by mikey, 1 year ago)

added implicit and explicit call to set as well as possibility for setting public properties
whitespace fixes

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