Mercurial > hg > isophonics-drupal-site
comparison vendor/nikic/php-parser/lib/PhpParser/Node.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 5fb285c0d0e3 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace PhpParser; | |
4 | |
5 interface Node | |
6 { | |
7 /** | |
8 * Gets the type of the node. | |
9 * | |
10 * @return string Type of the node | |
11 */ | |
12 public function getType(); | |
13 | |
14 /** | |
15 * Gets the names of the sub nodes. | |
16 * | |
17 * @return array Names of sub nodes | |
18 */ | |
19 public function getSubNodeNames(); | |
20 | |
21 /** | |
22 * Gets line the node started in. | |
23 * | |
24 * @return int Line | |
25 */ | |
26 public function getLine(); | |
27 | |
28 /** | |
29 * Sets line the node started in. | |
30 * | |
31 * @param int $line Line | |
32 * | |
33 * @deprecated | |
34 */ | |
35 public function setLine($line); | |
36 | |
37 /** | |
38 * Gets the doc comment of the node. | |
39 * | |
40 * The doc comment has to be the last comment associated with the node. | |
41 * | |
42 * @return null|Comment\Doc Doc comment object or null | |
43 */ | |
44 public function getDocComment(); | |
45 | |
46 /** | |
47 * Sets the doc comment of the node. | |
48 * | |
49 * This will either replace an existing doc comment or add it to the comments array. | |
50 * | |
51 * @param Comment\Doc $docComment Doc comment to set | |
52 */ | |
53 public function setDocComment(Comment\Doc $docComment); | |
54 | |
55 /** | |
56 * Sets an attribute on a node. | |
57 * | |
58 * @param string $key | |
59 * @param mixed $value | |
60 */ | |
61 public function setAttribute($key, $value); | |
62 | |
63 /** | |
64 * Returns whether an attribute exists. | |
65 * | |
66 * @param string $key | |
67 * | |
68 * @return bool | |
69 */ | |
70 public function hasAttribute($key); | |
71 | |
72 /** | |
73 * Returns the value of an attribute. | |
74 * | |
75 * @param string $key | |
76 * @param mixed $default | |
77 * | |
78 * @return mixed | |
79 */ | |
80 public function &getAttribute($key, $default = null); | |
81 | |
82 /** | |
83 * Returns all attributes for the given node. | |
84 * | |
85 * @return array | |
86 */ | |
87 public function getAttributes(); | |
88 } |