1: <?php
2:
3: 4: 5: 6: 7: 8: 9: 10: 11:
12:
13:
14:
15: 16: 17: 18: 19: 20:
21: class NParameterReflection extends ReflectionParameter
22: {
23:
24: private $function;
25:
26:
27: public function __construct($function, $parameter)
28: {
29: parent::__construct($this->function = $function, $parameter);
30: }
31:
32:
33:
34: 35: 36:
37: public function getClass()
38: {
39: return ($ref = parent::getClass()) ? new NClassReflection($ref->getName()) : NULL;
40: }
41:
42:
43:
44: 45: 46:
47: public function getDeclaringClass()
48: {
49: return ($ref = parent::getDeclaringClass()) ? new NClassReflection($ref->getName()) : NULL;
50: }
51:
52:
53:
54: 55: 56:
57: public function getDeclaringFunction()
58: {
59: return is_array($this->function) ? new NMethodReflection($this->function[0], $this->function[1]) : new NFunctionReflection($this->function);
60: }
61:
62:
63:
64:
65:
66:
67:
68: 69: 70:
71: public function getReflection()
72: {
73: return new NClassReflection($this);
74: }
75:
76:
77:
78: public function __call($name, $args)
79: {
80: return NObjectMixin::call($this, $name, $args);
81: }
82:
83:
84:
85: public function &__get($name)
86: {
87: return NObjectMixin::get($this, $name);
88: }
89:
90:
91:
92: public function __set($name, $value)
93: {
94: return NObjectMixin::set($this, $name, $value);
95: }
96:
97:
98:
99: public function __isset($name)
100: {
101: return NObjectMixin::has($this, $name);
102: }
103:
104:
105:
106: public function __unset($name)
107: {
108: throw new MemberAccessException("Cannot unset the property {$this->reflection->name}::\$$name.");
109: }
110:
111: }
112: