Skip to content

Commit

Permalink
added some methods for storing metadata to the interface
Browse files Browse the repository at this point in the history
  • Loading branch information
schmittjoh committed Apr 3, 2012
1 parent 77d58a4 commit e932711
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions lib/PHPParser/Node.php
Expand Up @@ -43,4 +43,38 @@ public function getDocComment();
* @param null|string $docComment Nearest doc comment or null
*/
public function setDocComment($docComment);

/**
* Sets an attribute on a node.
*
* @param string $key
* @param mixed $value
*/
public function setAttribute($key, $value);

/**
* Returns whether an attribute exists.
*
* @param string $key
*
* @return Boolean
*/
public function hasAttribute($key);

/**
* Returns the value of an attribute.
*
* @param string $key
* @param mixed $default
*
* @return mixed
*/
public function getAttribute($key, $default = null);

/**
* Returns all attributes for the given node.
*
* @return array
*/
public function getAttributes();
}

0 comments on commit e932711

Please sign in to comment.