[2.0] Removing old unused code from Addendum
This commit is contained in:
parent
6770295ac9
commit
7a79785dff
@ -5,33 +5,11 @@ namespace Doctrine\Common\Annotations;
|
|||||||
class Annotation
|
class Annotation
|
||||||
{
|
{
|
||||||
public $value;
|
public $value;
|
||||||
private static $creationStack = array();
|
|
||||||
|
|
||||||
public final function __construct(array $data)
|
public final function __construct(array $data)
|
||||||
{
|
{
|
||||||
$reflection = new \ReflectionClass($this);
|
|
||||||
$class = $reflection->getName();
|
|
||||||
if (isset(self::$creationStack[$class])) {
|
|
||||||
trigger_error("Circular annotation reference on '$class'", E_USER_ERROR);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
self::$creationStack[$class] = true;
|
|
||||||
foreach ($data as $key => $value) {
|
foreach ($data as $key => $value) {
|
||||||
$this->$key = $value;
|
$this->$key = $value;
|
||||||
}
|
}
|
||||||
unset(self::$creationStack[$class]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private function createName($target)
|
|
||||||
{
|
|
||||||
if ($target instanceof ReflectionMethod) {
|
|
||||||
return $target->getDeclaringClass()->getName().'::'.$target->getName();
|
|
||||||
} else if ($target instanceof ReflectionProperty) {
|
|
||||||
return $target->getDeclaringClass()->getName().'::$'.$target->getName();
|
|
||||||
} else {
|
|
||||||
return $target->getName();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//protected function checkConstraints($target) {}
|
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user