/var/www/vhosts/nabawater/common/vendor/Addendum
NameSizeModeActions
Parser/-0775rm
Addendum.php33140664editdlrm
Annotation.php25710664editdlrm
AnnotationsBuilder.php22850664editdlrm
AnnotationsCollection.php12330664editdlrm
DocComment.php46920664editdlrm
LICENSE264210664editdlrm
ReflectionAnnotatedClass.php28260664editdlrm
ReflectionAnnotatedMethod.php10680664editdlrm
ReflectionAnnotatedProperty.php10720664editdlrm
Edit: /var/www/vhosts/nabawater/common/vendor/Addendum/Annotation.php (2571B)
getName(); if(isset(self::$creationStack[$class])) { trigger_error("Circular annotation reference on '$class'", E_USER_ERROR); } self::$creationStack[$class] = true; foreach($data as $key => $value) { if($reflection->hasProperty($key)) { $this->$key = $value; } else { trigger_error("Property '$key' not defined for annotation '$class'"); } } $this->checkTargetConstraints($target); $this->checkConstraints($target); unset(self::$creationStack[$class]); } private function checkTargetConstraints($target) { $reflection = new ReflectionAnnotatedClass($this); if($reflection->hasAnnotation('Target')) { $value = $reflection->getAnnotation('Target')->value; $values = is_array($value) ? $value : array($value); foreach($values as $value) { if($value == 'class' && $target instanceof \ReflectionClass) return; if($value == 'method' && $target instanceof \ReflectionMethod) return; if($value == 'property' && $target instanceof \ReflectionProperty) return; if($value == 'nested' && $target === false) return; } if($target === false) { trigger_error("Annotation '".get_class($this)."' nesting not allowed", E_USER_ERROR); } else { trigger_error("Annotation '".get_class($this)."' not allowed on ".$this->createName($target), E_USER_ERROR); } } } private function createName($target) { if($target instanceof \ReflectionMethod) { return $target->getDeclaringClass()->getName().'::'.$target->getName(); } elseif($target instanceof \ReflectionProperty) { return $target->getDeclaringClass()->getName().'::$'.$target->getName(); } else { return $target->getName(); } } protected function checkConstraints($target) { } }