7f6522bbac5bee97982ba673194e0a9da14cdff9
[yaffs-website] / vendor / doctrine / common / lib / Doctrine / Common / Reflection / StaticReflectionProperty.php
1 <?php
2 /*
3  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
4  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
5  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
6  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
7  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
8  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
9  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
10  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
11  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
12  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
13  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
14  *
15  * This software consists of voluntary contributions made by many individuals
16  * and is licensed under the MIT license. For more information, see
17  * <http://www.doctrine-project.org>.
18  */
19
20 namespace Doctrine\Common\Reflection;
21
22 use ReflectionException;
23 use ReflectionProperty;
24
25 class StaticReflectionProperty extends ReflectionProperty
26 {
27     /**
28      * The PSR-0 parser object.
29      *
30      * @var StaticReflectionParser
31      */
32     protected $staticReflectionParser;
33
34     /**
35      * The name of the property.
36      *
37      * @var string|null
38      */
39     protected $propertyName;
40
41     /**
42      * @param StaticReflectionParser $staticReflectionParser
43      * @param string|null            $propertyName
44      */
45     public function __construct(StaticReflectionParser $staticReflectionParser, $propertyName)
46     {
47         $this->staticReflectionParser = $staticReflectionParser;
48         $this->propertyName = $propertyName;
49     }
50
51     /**
52      * {@inheritDoc}
53      */
54     public function getName()
55     {
56         return $this->propertyName;
57     }
58
59     /**
60      * @return StaticReflectionParser
61      */
62     protected function getStaticReflectionParser()
63     {
64         return $this->staticReflectionParser->getStaticReflectionParserForDeclaringClass('property', $this->propertyName);
65     }
66
67     /**
68      * {@inheritDoc}
69      */
70     public function getDeclaringClass()
71     {
72         return $this->getStaticReflectionParser()->getReflectionClass();
73     }
74
75     /**
76      * {@inheritDoc}
77      */
78     public function getDocComment()
79     {
80         return $this->getStaticReflectionParser()->getDocComment('property', $this->propertyName);
81     }
82
83     /**
84      * @return array
85      */
86     public function getUseStatements()
87     {
88         return $this->getStaticReflectionParser()->getUseStatements();
89     }
90
91     /**
92      * {@inheritDoc}
93      */
94     public static function export($class, $name, $return = false)
95     {
96         throw new ReflectionException('Method not implemented');
97     }
98
99     /**
100      * {@inheritDoc}
101      */
102     public function getModifiers()
103     {
104         throw new ReflectionException('Method not implemented');
105     }
106
107     /**
108      * {@inheritDoc}
109      */
110     public function getValue($object = null)
111     {
112         throw new ReflectionException('Method not implemented');
113     }
114
115     /**
116      * {@inheritDoc}
117      */
118     public function isDefault()
119     {
120         throw new ReflectionException('Method not implemented');
121     }
122
123     /**
124      * {@inheritDoc}
125      */
126     public function isPrivate()
127     {
128         throw new ReflectionException('Method not implemented');
129     }
130
131     /**
132      * {@inheritDoc}
133      */
134     public function isProtected()
135     {
136         throw new ReflectionException('Method not implemented');
137     }
138
139     /**
140      * {@inheritDoc}
141      */
142     public function isPublic()
143     {
144         throw new ReflectionException('Method not implemented');
145     }
146
147     /**
148      * {@inheritDoc}
149      */
150     public function isStatic()
151     {
152         throw new ReflectionException('Method not implemented');
153     }
154
155     /**
156      * {@inheritDoc}
157      */
158     public function setAccessible($accessible)
159     {
160         throw new ReflectionException('Method not implemented');
161     }
162
163     /**
164      * {@inheritDoc}
165      */
166     public function setValue($object, $value = null)
167     {
168         throw new ReflectionException('Method not implemented');
169     }
170
171     /**
172      * {@inheritDoc}
173      */
174     public function __toString()
175     {
176         throw new ReflectionException('Method not implemented');
177     }
178 }