PhpParser\NodeAbstract::getAttribute PHP Method

getAttribute() public method

public getAttribute ( $key, $default = null )
    public function &getAttribute($key, $default = null)
    {
        if (!array_key_exists($key, $this->attributes)) {
            return $default;
        } else {
            return $this->attributes[$key];
        }
    }