예제 #1
0
}
class B extends Test
{
}
class C extends Test
{
}
class D extends Test
{
}
class E extends Test
{
}
$d = new D();
$d['e'] = new E();
$b = new B();
$b->monitor('a');
$b['c'] = new C();
$b['c']->monitor('a');
$b['c']['d'] = $d;
echo "\n'a' becoming 'b' parent\n";
$a = new A();
$a['b'] = $b;
echo "\nremoving 'b' from 'a'\n";
unset($a['b']);
echo "\n'a' becoming 'b' parent\n";
$a['b'] = $b;
echo "\n'e' looking 'a'\n";
echo $d['e']->lookupPath('A');
echo "\n\nchecking 'a-b-c'\n";
Debug::dump($a['b-c'] === $b['c']);