PHPMD\Node\Annotations::__construct PHP Method

__construct() public method

Constructs a new collection instance.
public __construct ( PHPMD\AbstractNode $node )
$node PHPMD\AbstractNode
    public function __construct(\PHPMD\AbstractNode $node)
    {
        preg_match_all($this->regexp, $node->getDocComment(), $matches);
        foreach (array_keys($matches[0]) as $i) {
            $name = $matches[1][$i];
            $value = trim($matches[2][$i], '" ');
            $this->annotations[] = new Annotation($name, $value);
        }
    }