TYPO3 CMS  TYPO3_6-2
PropertyReflection.php
Go to the documentation of this file.
1 <?php
3 
19 class PropertyReflection extends \ReflectionProperty {
20 
24  protected $docCommentParser;
25 
32  public function __construct($className, $propertyName) {
33  parent::__construct($className, $propertyName);
34  }
35 
43  public function isTaggedWith($tag) {
44  $result = $this->getDocCommentParser()->isTaggedWith($tag);
45  return $result;
46  }
47 
53  public function getTagsValues() {
54  return $this->getDocCommentParser()->getTagsValues();
55  }
56 
63  public function getTagValues($tag) {
64  return $this->getDocCommentParser()->getTagValues($tag);
65  }
66 
75  public function getValue($object = NULL) {
76  if (!is_object($object)) {
77  throw new \TYPO3\CMS\Extbase\Reflection\Exception('$object is of type ' . gettype($object) . ', instance of class ' . $this->class . ' expected.', 1210859212);
78  }
79  if ($this->isPublic()) {
80  return parent::getValue($object);
81  }
82  if ($this->isPrivate()) {
83  throw new \TYPO3\CMS\Extbase\Reflection\Exception('Cannot return value of private property "' . $this->name . '.', 1210859206);
84  }
85  parent::setAccessible(TRUE);
86  return parent::getValue($object);
87  }
88 
95  protected function getDocCommentParser() {
96  if (!is_object($this->docCommentParser)) {
97  $this->docCommentParser = new \TYPO3\CMS\Extbase\Reflection\DocCommentParser();
98  $this->docCommentParser->parseDocComment($this->getDocComment());
99  }
101  }
102 }
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren&#39;t numeric.