|
Revision 129, 0.6 kB
(checked in by mikey, 1 year ago)
|
renamed XJConfLoader to XJConf
|
| Line | |
|---|
| 1 |
<?php |
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
require_once '../XJConf/XJConf.php'; |
|---|
| 9 |
use net::xjconf::DefinitionParser; |
|---|
| 10 |
use net::xjconf::XmlParser; |
|---|
| 11 |
|
|---|
| 12 |
class Properties { |
|---|
| 13 |
protected $props = array(); |
|---|
| 14 |
|
|---|
| 15 |
public function setProperty($name, $value) { |
|---|
| 16 |
$this->props[$name] = $value; |
|---|
| 17 |
} |
|---|
| 18 |
} |
|---|
| 19 |
|
|---|
| 20 |
$tagParser = new DefinitionParser(); |
|---|
| 21 |
$defs = $tagParser->parse(getcwd() . '/xml/defines-method.xml'); |
|---|
| 22 |
|
|---|
| 23 |
$conf = new XmlParser(); |
|---|
| 24 |
$conf->setTagDefinitions($defs); |
|---|
| 25 |
|
|---|
| 26 |
$conf->parse(getcwd() . '/xml/test-method.xml'); |
|---|
| 27 |
|
|---|
| 28 |
print_r($conf->getConfigValue('props')); |
|---|
| 29 |
?> |
|---|