num = $num;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('num');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Case_.php:
--------------------------------------------------------------------------------
1 | cond = $cond;
24 | $this->stmts = $stmts;
25 | }
26 |
27 | public function getSubNodeNames() {
28 | return array('cond', 'stmts');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Catch_.php:
--------------------------------------------------------------------------------
1 | type = $type;
27 | $this->var = $var;
28 | $this->stmts = $stmts;
29 | }
30 |
31 | public function getSubNodeNames() {
32 | return array('type', 'var', 'stmts');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/ClassConst.php:
--------------------------------------------------------------------------------
1 | consts = $consts;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('consts');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/ClassLike.php:
--------------------------------------------------------------------------------
1 | stmts as $stmt) {
16 | if ($stmt instanceof ClassMethod) {
17 | $methods[] = $stmt;
18 | }
19 | }
20 | return $methods;
21 | }
22 | }
23 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/ClassMethod.php:
--------------------------------------------------------------------------------
1 | MODIFIER_PUBLIC: Type
29 | * 'byRef' => false : Whether to return by reference
30 | * 'params' => array() : Parameters
31 | * 'returnType' => null : Return type
32 | * 'stmts' => array() : Statements
33 | * @param array $attributes Additional attributes
34 | */
35 | public function __construct($name, array $subNodes = array(), array $attributes = array()) {
36 | parent::__construct(null, $attributes);
37 | $this->type = isset($subNodes['type']) ? $subNodes['type'] : 0;
38 | $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
39 | $this->name = $name;
40 | $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
41 | $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
42 | $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : array();
43 |
44 | if ($this->type & Class_::MODIFIER_STATIC) {
45 | switch (strtolower($this->name)) {
46 | case '__construct':
47 | throw new Error(sprintf('Constructor %s() cannot be static', $this->name));
48 | case '__destruct':
49 | throw new Error(sprintf('Destructor %s() cannot be static', $this->name));
50 | case '__clone':
51 | throw new Error(sprintf('Clone method %s() cannot be static', $this->name));
52 | }
53 | }
54 | }
55 |
56 | public function getSubNodeNames() {
57 | return array('type', 'byRef', 'name', 'params', 'returnType', 'stmts');
58 | }
59 |
60 | public function isPublic() {
61 | return ($this->type & Class_::MODIFIER_PUBLIC) !== 0 || $this->type === 0;
62 | }
63 |
64 | public function isProtected() {
65 | return (bool) ($this->type & Class_::MODIFIER_PROTECTED);
66 | }
67 |
68 | public function isPrivate() {
69 | return (bool) ($this->type & Class_::MODIFIER_PRIVATE);
70 | }
71 |
72 | public function isAbstract() {
73 | return (bool) ($this->type & Class_::MODIFIER_ABSTRACT);
74 | }
75 |
76 | public function isFinal() {
77 | return (bool) ($this->type & Class_::MODIFIER_FINAL);
78 | }
79 |
80 | public function isStatic() {
81 | return (bool) ($this->type & Class_::MODIFIER_STATIC);
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Class_.php:
--------------------------------------------------------------------------------
1 | true,
28 | 'parent' => true,
29 | 'static' => true,
30 | );
31 |
32 | /**
33 | * Constructs a class node.
34 | *
35 | * @param string $name Name
36 | * @param array $subNodes Array of the following optional subnodes:
37 | * 'type' => 0 : Type
38 | * 'extends' => null : Name of extended class
39 | * 'implements' => array(): Names of implemented interfaces
40 | * 'stmts' => array(): Statements
41 | * @param array $attributes Additional attributes
42 | */
43 | public function __construct($name, array $subNodes = array(), array $attributes = array()) {
44 | parent::__construct(null, $attributes);
45 | $this->type = isset($subNodes['type']) ? $subNodes['type'] : 0;
46 | $this->name = $name;
47 | $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : null;
48 | $this->implements = isset($subNodes['implements']) ? $subNodes['implements'] : array();
49 | $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
50 |
51 | if (isset(self::$specialNames[(string) $this->name])) {
52 | throw new Error(sprintf('Cannot use \'%s\' as class name as it is reserved', $this->name));
53 | }
54 |
55 | if (isset(self::$specialNames[(string) $this->extends])) {
56 | throw new Error(sprintf('Cannot use \'%s\' as class name as it is reserved', $this->extends));
57 | }
58 |
59 | foreach ($this->implements as $interface) {
60 | if (isset(self::$specialNames[(string) $interface])) {
61 | throw new Error(sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface));
62 | }
63 | }
64 | }
65 |
66 | public function getSubNodeNames() {
67 | return array('type', 'name', 'extends', 'implements', 'stmts');
68 | }
69 |
70 | public function isAbstract() {
71 | return (bool) ($this->type & self::MODIFIER_ABSTRACT);
72 | }
73 |
74 | public function isFinal() {
75 | return (bool) ($this->type & self::MODIFIER_FINAL);
76 | }
77 |
78 | /**
79 | * @internal
80 | */
81 | public static function verifyModifier($a, $b) {
82 | if ($a & self::VISIBILITY_MODIFER_MASK && $b & self::VISIBILITY_MODIFER_MASK) {
83 | throw new Error('Multiple access type modifiers are not allowed');
84 | }
85 |
86 | if ($a & self::MODIFIER_ABSTRACT && $b & self::MODIFIER_ABSTRACT) {
87 | throw new Error('Multiple abstract modifiers are not allowed');
88 | }
89 |
90 | if ($a & self::MODIFIER_STATIC && $b & self::MODIFIER_STATIC) {
91 | throw new Error('Multiple static modifiers are not allowed');
92 | }
93 |
94 | if ($a & self::MODIFIER_FINAL && $b & self::MODIFIER_FINAL) {
95 | throw new Error('Multiple final modifiers are not allowed');
96 | }
97 |
98 | if ($a & 48 && $b & 48) {
99 | throw new Error('Cannot use the final modifier on an abstract class member');
100 | }
101 | }
102 | }
103 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Const_.php:
--------------------------------------------------------------------------------
1 | consts = $consts;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('consts');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Continue_.php:
--------------------------------------------------------------------------------
1 | num = $num;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('num');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/DeclareDeclare.php:
--------------------------------------------------------------------------------
1 | value pair node.
16 | *
17 | * @param string $key Key
18 | * @param Node\Expr $value Value
19 | * @param array $attributes Additional attributes
20 | */
21 | public function __construct($key, Node\Expr $value, array $attributes = array()) {
22 | parent::__construct(null, $attributes);
23 | $this->key = $key;
24 | $this->value = $value;
25 | }
26 |
27 | public function getSubNodeNames() {
28 | return array('key', 'value');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Declare_.php:
--------------------------------------------------------------------------------
1 | declares = $declares;
23 | $this->stmts = $stmts;
24 | }
25 |
26 | public function getSubNodeNames() {
27 | return array('declares', 'stmts');
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Do_.php:
--------------------------------------------------------------------------------
1 | cond = $cond;
24 | $this->stmts = $stmts;
25 | }
26 |
27 | public function getSubNodeNames() {
28 | return array('cond', 'stmts');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Echo_.php:
--------------------------------------------------------------------------------
1 | exprs = $exprs;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('exprs');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/ElseIf_.php:
--------------------------------------------------------------------------------
1 | cond = $cond;
24 | $this->stmts = $stmts;
25 | }
26 |
27 | public function getSubNodeNames() {
28 | return array('cond', 'stmts');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Else_.php:
--------------------------------------------------------------------------------
1 | stmts = $stmts;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('stmts');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/For_.php:
--------------------------------------------------------------------------------
1 | array(): Init expressions
23 | * 'cond' => array(): Loop conditions
24 | * 'loop' => array(): Loop expressions
25 | * 'stmts' => array(): Statements
26 | * @param array $attributes Additional attributes
27 | */
28 | public function __construct(array $subNodes = array(), array $attributes = array()) {
29 | parent::__construct(null, $attributes);
30 | $this->init = isset($subNodes['init']) ? $subNodes['init'] : array();
31 | $this->cond = isset($subNodes['cond']) ? $subNodes['cond'] : array();
32 | $this->loop = isset($subNodes['loop']) ? $subNodes['loop'] : array();
33 | $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
34 | }
35 |
36 | public function getSubNodeNames() {
37 | return array('init', 'cond', 'loop', 'stmts');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Foreach_.php:
--------------------------------------------------------------------------------
1 | null : Variable to assign key to
27 | * 'byRef' => false : Whether to assign value by reference
28 | * 'stmts' => array(): Statements
29 | * @param array $attributes Additional attributes
30 | */
31 | public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = array(), array $attributes = array()) {
32 | parent::__construct(null, $attributes);
33 | $this->expr = $expr;
34 | $this->keyVar = isset($subNodes['keyVar']) ? $subNodes['keyVar'] : null;
35 | $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
36 | $this->valueVar = $valueVar;
37 | $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
38 | }
39 |
40 | public function getSubNodeNames() {
41 | return array('expr', 'keyVar', 'byRef', 'valueVar', 'stmts');
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Function_.php:
--------------------------------------------------------------------------------
1 | false : Whether to return by reference
26 | * 'params' => array(): Parameters
27 | * 'returnType' => null : Return type
28 | * 'stmts' => array(): Statements
29 | * @param array $attributes Additional attributes
30 | */
31 | public function __construct($name, array $subNodes = array(), array $attributes = array()) {
32 | parent::__construct(null, $attributes);
33 | $this->byRef = isset($subNodes['byRef']) ? $subNodes['byRef'] : false;
34 | $this->name = $name;
35 | $this->params = isset($subNodes['params']) ? $subNodes['params'] : array();
36 | $this->returnType = isset($subNodes['returnType']) ? $subNodes['returnType'] : null;
37 | $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
38 | }
39 |
40 | public function getSubNodeNames() {
41 | return array('byRef', 'name', 'params', 'returnType', 'stmts');
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Global_.php:
--------------------------------------------------------------------------------
1 | vars = $vars;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('vars');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Goto_.php:
--------------------------------------------------------------------------------
1 | name = $name;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('name');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/HaltCompiler.php:
--------------------------------------------------------------------------------
1 | remaining = $remaining;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('remaining');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/If_.php:
--------------------------------------------------------------------------------
1 | array(): Statements
24 | * 'elseifs' => array(): Elseif clauses
25 | * 'else' => null : Else clause
26 | * @param array $attributes Additional attributes
27 | */
28 | public function __construct(Node\Expr $cond, array $subNodes = array(), array $attributes = array()) {
29 | parent::__construct(null, $attributes);
30 | $this->cond = $cond;
31 | $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
32 | $this->elseifs = isset($subNodes['elseifs']) ? $subNodes['elseifs'] : array();
33 | $this->else = isset($subNodes['else']) ? $subNodes['else'] : null;
34 | }
35 |
36 | public function getSubNodeNames() {
37 | return array('cond', 'stmts', 'elseifs', 'else');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/InlineHTML.php:
--------------------------------------------------------------------------------
1 | value = $value;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('value');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Interface_.php:
--------------------------------------------------------------------------------
1 | true,
15 | 'parent' => true,
16 | 'static' => true,
17 | );
18 |
19 | /**
20 | * Constructs a class node.
21 | *
22 | * @param string $name Name
23 | * @param array $subNodes Array of the following optional subnodes:
24 | * 'extends' => array(): Name of extended interfaces
25 | * 'stmts' => array(): Statements
26 | * @param array $attributes Additional attributes
27 | */
28 | public function __construct($name, array $subNodes = array(), array $attributes = array()) {
29 | parent::__construct(null, $attributes);
30 | $this->name = $name;
31 | $this->extends = isset($subNodes['extends']) ? $subNodes['extends'] : array();
32 | $this->stmts = isset($subNodes['stmts']) ? $subNodes['stmts'] : array();
33 |
34 | if (isset(self::$specialNames[(string) $this->name])) {
35 | throw new Error(sprintf('Cannot use \'%s\' as class name as it is reserved', $this->name));
36 | }
37 |
38 | foreach ($this->extends as $interface) {
39 | if (isset(self::$specialNames[(string) $interface])) {
40 | throw new Error(sprintf('Cannot use \'%s\' as interface name as it is reserved', $interface));
41 | }
42 | }
43 | }
44 |
45 | public function getSubNodeNames() {
46 | return array('name', 'extends', 'stmts');
47 | }
48 | }
49 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Label.php:
--------------------------------------------------------------------------------
1 | name = $name;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('name');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Namespace_.php:
--------------------------------------------------------------------------------
1 | true,
17 | 'parent' => true,
18 | 'static' => true,
19 | );
20 |
21 | /**
22 | * Constructs a namespace node.
23 | *
24 | * @param null|Node\Name $name Name
25 | * @param null|Node[] $stmts Statements
26 | * @param array $attributes Additional attributes
27 | */
28 | public function __construct(Node\Name $name = null, $stmts = array(), array $attributes = array()) {
29 | parent::__construct(null, $attributes);
30 | $this->name = $name;
31 | $this->stmts = $stmts;
32 |
33 | if (isset(self::$specialNames[(string) $this->name])) {
34 | throw new Error(sprintf('Cannot use \'%s\' as namespace name', $this->name));
35 | }
36 |
37 | if (null !== $this->stmts) {
38 | foreach ($this->stmts as $stmt) {
39 | if ($stmt instanceof self) {
40 | throw new Error('Namespace declarations cannot be nested', $stmt->getLine());
41 | }
42 | }
43 | }
44 | }
45 |
46 | public function getSubNodeNames() {
47 | return array('name', 'stmts');
48 | }
49 | }
50 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Property.php:
--------------------------------------------------------------------------------
1 | type = $type;
33 | $this->props = $props;
34 | }
35 |
36 | public function getSubNodeNames() {
37 | return array('type', 'props');
38 | }
39 |
40 | public function isPublic() {
41 | return ($this->type & Class_::MODIFIER_PUBLIC) !== 0 || $this->type === 0;
42 | }
43 |
44 | public function isProtected() {
45 | return (bool) ($this->type & Class_::MODIFIER_PROTECTED);
46 | }
47 |
48 | public function isPrivate() {
49 | return (bool) ($this->type & Class_::MODIFIER_PRIVATE);
50 | }
51 |
52 | public function isStatic() {
53 | return (bool) ($this->type & Class_::MODIFIER_STATIC);
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/PropertyProperty.php:
--------------------------------------------------------------------------------
1 | name = $name;
24 | $this->default = $default;
25 | }
26 |
27 | public function getSubNodeNames() {
28 | return array('name', 'default');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Return_.php:
--------------------------------------------------------------------------------
1 | expr = $expr;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('expr');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/StaticVar.php:
--------------------------------------------------------------------------------
1 | name = $name;
24 | $this->default = $default;
25 | }
26 |
27 | public function getSubNodeNames() {
28 | return array('name', 'default');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Static_.php:
--------------------------------------------------------------------------------
1 | vars = $vars;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('vars');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Switch_.php:
--------------------------------------------------------------------------------
1 | cond = $cond;
24 | $this->cases = $cases;
25 | }
26 |
27 | public function getSubNodeNames() {
28 | return array('cond', 'cases');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Throw_.php:
--------------------------------------------------------------------------------
1 | expr = $expr;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('expr');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/TraitUse.php:
--------------------------------------------------------------------------------
1 | traits = $traits;
25 | $this->adaptations = $adaptations;
26 | }
27 |
28 | public function getSubNodeNames() {
29 | return array('traits', 'adaptations');
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/TraitUseAdaptation.php:
--------------------------------------------------------------------------------
1 | trait = $trait;
26 | $this->method = $method;
27 | $this->newModifier = $newModifier;
28 | $this->newName = $newName;
29 | }
30 |
31 | public function getSubNodeNames() {
32 | return array('trait', 'method', 'newModifier', 'newName');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/TraitUseAdaptation/Precedence.php:
--------------------------------------------------------------------------------
1 | trait = $trait;
23 | $this->method = $method;
24 | $this->insteadof = $insteadof;
25 | }
26 |
27 | public function getSubNodeNames() {
28 | return array('trait', 'method', 'insteadof');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Trait_.php:
--------------------------------------------------------------------------------
1 | name = $name;
19 | $this->stmts = $stmts;
20 | }
21 |
22 | public function getSubNodeNames() {
23 | return array('name', 'stmts');
24 | }
25 | }
26 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/TryCatch.php:
--------------------------------------------------------------------------------
1 | stmts = $stmts;
32 | $this->catches = $catches;
33 | $this->finallyStmts = $finallyStmts;
34 | }
35 |
36 | public function getSubNodeNames() {
37 | return array('stmts', 'catches', 'finallyStmts');
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Unset_.php:
--------------------------------------------------------------------------------
1 | vars = $vars;
21 | }
22 |
23 | public function getSubNodeNames() {
24 | return array('vars');
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/UseUse.php:
--------------------------------------------------------------------------------
1 | getLast();
25 | }
26 |
27 | if ('self' == $alias || 'parent' == $alias) {
28 | throw new Error(sprintf(
29 | 'Cannot use %s as %s because \'%2$s\' is a special class name',
30 | $name, $alias
31 | ));
32 | }
33 |
34 | parent::__construct(null, $attributes);
35 | $this->name = $name;
36 | $this->alias = $alias;
37 | }
38 |
39 | public function getSubNodeNames() {
40 | return array('name', 'alias');
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/Use_.php:
--------------------------------------------------------------------------------
1 | type = $type;
28 | $this->uses = $uses;
29 | }
30 |
31 | public function getSubNodeNames() {
32 | return array('type', 'uses');
33 | }
34 | }
35 |
--------------------------------------------------------------------------------
/PhpParser/Node/Stmt/While_.php:
--------------------------------------------------------------------------------
1 | cond = $cond;
24 | $this->stmts = $stmts;
25 | }
26 |
27 | public function getSubNodeNames() {
28 | return array('cond', 'stmts');
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/PhpParser/NodeAbstract.php:
--------------------------------------------------------------------------------
1 | attributes = $attributes;
24 |
25 | if (null !== $subNodes) {
26 | foreach ($subNodes as $name => $value) {
27 | $this->$name = $value;
28 | }
29 | $this->subNodeNames = array_keys($subNodes);
30 | }
31 | }
32 |
33 | /**
34 | * Gets the type of the node.
35 | *
36 | * @return string Type of the node
37 | */
38 | public function getType() {
39 | return strtr(substr(rtrim(get_class($this), '_'), 15), '\\', '_');
40 | }
41 |
42 | /**
43 | * Gets the names of the sub nodes.
44 | *
45 | * @return array Names of sub nodes
46 | */
47 | public function getSubNodeNames() {
48 | return $this->subNodeNames;
49 | }
50 |
51 | /**
52 | * Gets line the node started in.
53 | *
54 | * @return int Line
55 | */
56 | public function getLine() {
57 | return $this->getAttribute('startLine', -1);
58 | }
59 |
60 | /**
61 | * Sets line the node started in.
62 | *
63 | * @param int $line Line
64 | */
65 | public function setLine($line) {
66 | $this->setAttribute('startLine', (int) $line);
67 | }
68 |
69 | /**
70 | * Gets the doc comment of the node.
71 | *
72 | * The doc comment has to be the last comment associated with the node.
73 | *
74 | * @return null|Comment\Doc Doc comment object or null
75 | */
76 | public function getDocComment() {
77 | $comments = $this->getAttribute('comments');
78 | if (!$comments) {
79 | return null;
80 | }
81 |
82 | $lastComment = $comments[count($comments) - 1];
83 | if (!$lastComment instanceof Comment\Doc) {
84 | return null;
85 | }
86 |
87 | return $lastComment;
88 | }
89 |
90 | /**
91 | * {@inheritDoc}
92 | */
93 | public function setAttribute($key, $value) {
94 | $this->attributes[$key] = $value;
95 | }
96 |
97 | /**
98 | * {@inheritDoc}
99 | */
100 | public function hasAttribute($key) {
101 | return array_key_exists($key, $this->attributes);
102 | }
103 |
104 | /**
105 | * {@inheritDoc}
106 | */
107 | public function &getAttribute($key, $default = null) {
108 | if (!array_key_exists($key, $this->attributes)) {
109 | return $default;
110 | } else {
111 | return $this->attributes[$key];
112 | }
113 | }
114 |
115 | /**
116 | * {@inheritDoc}
117 | */
118 | public function getAttributes() {
119 | return $this->attributes;
120 | }
121 | }
122 |
--------------------------------------------------------------------------------
/PhpParser/NodeDumper.php:
--------------------------------------------------------------------------------
1 | getType() . '(';
17 |
18 | foreach ($node->getSubNodeNames() as $key) {
19 | $r .= "\n " . $key . ': ';
20 |
21 | $value = $node->$key;
22 | if (null === $value) {
23 | $r .= 'null';
24 | } elseif (false === $value) {
25 | $r .= 'false';
26 | } elseif (true === $value) {
27 | $r .= 'true';
28 | } elseif (is_scalar($value)) {
29 | $r .= $value;
30 | } else {
31 | $r .= str_replace("\n", "\n ", $this->dump($value));
32 | }
33 | }
34 | } elseif (is_array($node)) {
35 | $r = 'array(';
36 |
37 | foreach ($node as $key => $value) {
38 | $r .= "\n " . $key . ': ';
39 |
40 | if (null === $value) {
41 | $r .= 'null';
42 | } elseif (false === $value) {
43 | $r .= 'false';
44 | } elseif (true === $value) {
45 | $r .= 'true';
46 | } elseif (is_scalar($value)) {
47 | $r .= $value;
48 | } else {
49 | $r .= str_replace("\n", "\n ", $this->dump($value));
50 | }
51 | }
52 | } else {
53 | throw new \InvalidArgumentException('Can only dump nodes and arrays.');
54 | }
55 |
56 | return $r . "\n)";
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/PhpParser/NodeTraverserInterface.php:
--------------------------------------------------------------------------------
1 | writer = new XMLWriter;
19 | $this->writer->openMemory();
20 | $this->writer->setIndent(true);
21 | }
22 |
23 | public function serialize(array $nodes) {
24 | $this->writer->flush();
25 | $this->writer->startDocument('1.0', 'UTF-8');
26 |
27 | $this->writer->startElement('AST');
28 | $this->writer->writeAttribute('xmlns:node', 'http://nikic.github.com/PHPParser/XML/node');
29 | $this->writer->writeAttribute('xmlns:subNode', 'http://nikic.github.com/PHPParser/XML/subNode');
30 | $this->writer->writeAttribute('xmlns:attribute', 'http://nikic.github.com/PHPParser/XML/attribute');
31 | $this->writer->writeAttribute('xmlns:scalar', 'http://nikic.github.com/PHPParser/XML/scalar');
32 |
33 | $this->_serialize($nodes);
34 |
35 | $this->writer->endElement();
36 |
37 | return $this->writer->outputMemory();
38 | }
39 |
40 | protected function _serialize($node) {
41 | if ($node instanceof Node) {
42 | $this->writer->startElement('node:' . $node->getType());
43 |
44 | foreach ($node->getAttributes() as $name => $value) {
45 | $this->writer->startElement('attribute:' . $name);
46 | $this->_serialize($value);
47 | $this->writer->endElement();
48 | }
49 |
50 | foreach ($node as $name => $subNode) {
51 | $this->writer->startElement('subNode:' . $name);
52 | $this->_serialize($subNode);
53 | $this->writer->endElement();
54 | }
55 |
56 | $this->writer->endElement();
57 | } elseif ($node instanceof Comment) {
58 | $this->writer->startElement('comment');
59 | $this->writer->writeAttribute('isDocComment', $node instanceof Comment\Doc ? 'true' : 'false');
60 | $this->writer->writeAttribute('line', (string) $node->getLine());
61 | $this->writer->text($node->getText());
62 | $this->writer->endElement();
63 | } elseif (is_array($node)) {
64 | $this->writer->startElement('scalar:array');
65 | foreach ($node as $subNode) {
66 | $this->_serialize($subNode);
67 | }
68 | $this->writer->endElement();
69 | } elseif (is_string($node)) {
70 | $this->writer->writeElement('scalar:string', $node);
71 | } elseif (is_int($node)) {
72 | $this->writer->writeElement('scalar:int', (string) $node);
73 | } elseif (is_float($node)) {
74 | // TODO Higher precision conversion?
75 | $this->writer->writeElement('scalar:float', (string) $node);
76 | } elseif (true === $node) {
77 | $this->writer->writeElement('scalar:true');
78 | } elseif (false === $node) {
79 | $this->writer->writeElement('scalar:false');
80 | } elseif (null === $node) {
81 | $this->writer->writeElement('scalar:null');
82 | } else {
83 | throw new \InvalidArgumentException('Unexpected node type');
84 | }
85 | }
86 | }
87 |
--------------------------------------------------------------------------------
/PhpParser/Unserializer.php:
--------------------------------------------------------------------------------
1 | ");
50 | if (!defined('CDXC_TITLE_END')) define('CDXC_TITLE_END', "");
51 | if (!defined('CDXC_CONTENT_START')) define('CDXC_CONTENT_START', "");
52 | if (!defined('CDXC_CONTENT_END')) define('CDXC_CONTENT_END', "
");
53 |
54 | if (!defined('CDXC_PHP_CODE_START')) define('CDXC_PHP_CODE_START', "");
55 | if (!defined('CDXC_PHP_CODE_END')) define('CDXC_PHP_CODE_END', "
");
56 |
57 | if (!defined('CDXC_SAMPLE_OPEN')) define('CDXC_SAMPLE_OPEN', "");
58 | if (!defined('CDXC_SAMPLE_CLOSE')) define('CDXC_SAMPLE_CLOSE', "
");
59 | }
60 |
61 | add_action('plugins_loaded', 'cdxc_define_constants');
62 |
63 |
64 | /**
65 | * Autoloads the phpDocumentor and PhpParser class files.
66 | *
67 | * @since 1.0.0
68 | * @package Codex_Creator
69 | * @param string $className The class name as a file path.
70 | */
71 | function cdxc_autoload($className)
72 | {
73 |
74 | if (strpos($className, 'phpDocumentor\\') === false && strpos($className, 'PhpParser\\') === false) {
75 | return;
76 | }
77 |
78 | $fileName = '';
79 | $namespace = '';
80 | if ($lastNsPos = strripos($className, '\\')) {
81 | $namespace = substr($className, 0, $lastNsPos);
82 | $className = substr($className, $lastNsPos + 1);
83 | $fileName = str_replace('\\', DIRECTORY_SEPARATOR, $namespace) . DIRECTORY_SEPARATOR;
84 | }
85 |
86 | if (substr($className, -1) == '_') {
87 | //if (strpos($className,'_.php') === false){
88 | $fileName = $fileName . $className . '.php';
89 | } else {
90 | $fileName .= str_replace('_', DIRECTORY_SEPARATOR, $className) . '.php';
91 | }
92 |
93 |
94 | require $fileName;
95 | }
96 |
97 | spl_autoload_register('cdxc_autoload');
98 |
99 |
100 | /**
101 | * Include CPT files.
102 | */
103 | include_once('lib/setup_cpt.php');
104 |
105 | /**
106 | * Setup section in WordPress tools.
107 | */
108 | include_once('lib/setup_section.php');
109 |
110 | /**
111 | * Codex Creator content output functions.
112 | */
113 | include_once('lib/content_output_functions.php');
114 |
115 | /**
116 | * Codex Creator general functions.
117 | */
118 | include_once('lib/general_functions.php');
119 |
120 | /**
121 | * Codex Creator general functions.
122 | */
123 | include_once('lib/helper_functions.php');
124 |
125 | /**
126 | * Codex Creator file functions.
127 | */
128 | include_once('lib/file_functions.php');
129 |
130 | /**
131 | * Codex Creator file functions.
132 | */
133 | include_once('lib/add_meta_boxes.php');
134 |
135 | /**
136 | * Codex Creator cron functions.
137 | */
138 | include_once('lib/cron_functions.php');
139 |
140 | /**
141 | * Codex Creator Bitbucket functions.
142 | */
143 | include_once('lib/bitbucket_functions.php');
--------------------------------------------------------------------------------
/css/codex_creator.css:
--------------------------------------------------------------------------------
1 | /**
2 | * CSS for the backend
3 | *
4 | * @since 1.0.0
5 | * @package Codex_Creator
6 | */
7 |
8 | .codex-creator-wrap {
9 | position: relative;
10 | overflow: auto;
11 | margin: 16px 0;
12 | padding: 0px 10px 0;
13 | border: 1px solid #e5e5e5;
14 | -webkit-box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
15 | box-shadow: 0 1px 1px rgba(0, 0, 0, .04);
16 | background: #fff;
17 | font-size: 13px;
18 | line-height: 2.1em;
19 | }
20 |
21 | .codex-creator-step-content {
22 | display: none;
23 | }
24 |
25 | .cc-active .codex-creator-step-content {
26 | display: block;
27 | }
28 |
29 | .cc-code-bits-tree,
30 | .cc-file-tree .cc-file-tree {
31 | padding-left: 15px;
32 | }
33 |
34 | .cc-file-tree .cc-file-tree-folder {
35 |
36 | }
37 |
38 | .cc-file-tree-action,
39 | .cc-file-tree-filter,
40 | .cc-file-tree-function,
41 | .cc-file-tree-file {
42 | border: 1px solid #ccc;
43 | padding: 0px 5px;
44 | }
45 |
46 | .cc-action-info-bloc,
47 | .cc-filter-info-bloc,
48 | .cc-file-info-bloc,
49 | .cc-function-info-bloc {
50 | float: right;
51 | }
52 |
53 | /*
54 | * Admin meta boxes
55 | */
56 |
57 | #cdxc_meta_box textarea {
58 | width: 100%;
59 | height: 65px;
60 | }
61 |
62 | #cdxc_meta_box input {
63 | width: 100%;
64 | }
65 |
66 | #cdxc_meta_box label {
67 | font-weight: bold;
68 | }
69 |
70 | .codex-creator-step-2 .codex-creator-step-content .cc-plugin-theme-list {
71 | display: table-caption;
72 | margin-bottom: 3px;
73 | }
74 |
75 | .codex-creator-wrap .fa-exclamation-triangle {
76 | color: #ff0000
77 | }
78 |
79 | /*
80 | * Loading div styles
81 | */
82 |
83 | .cc-loading-div {
84 | height: 20px;
85 | margin-bottom: 20px;
86 | overflow: hidden;
87 | background-color: #f5f5f5;
88 | border-radius: 4px;
89 | -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
90 | box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1);
91 | box-sizing: border-box;
92 | }
93 |
94 | .cc-loading-progress {
95 | float: left;
96 | width: 0;
97 | height: 100%;
98 | font-size: 12px;
99 | line-height: 20px;
100 | color: #fff;
101 | text-align: center;
102 | background-color: #337ab7;
103 | -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
104 | box-shadow: inset 0 -1px 0 rgba(0, 0, 0, .15);
105 | -webkit-transition: width .6s ease;
106 | -o-transition: width .6s ease;
107 | transition: width .6s ease;
108 | box-sizing: border-box;
109 | }
110 |
111 | .cc-loading-progress-striped {
112 | background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
113 | background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
114 | background-image: linear-gradient(45deg, rgba(255, 255, 255, .15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, .15) 50%, rgba(255, 255, 255, .15) 75%, transparent 75%, transparent);
115 | -webkit-background-size: 40px 40px;
116 | background-size: 40px 40px;
117 | }
118 |
119 | .cc-loading-progress.cc-active {
120 | -webkit-animation: cc-loading-progress-striped 2s linear infinite;
121 | -o-animation: cc-loading-progress-striped 2s linear infinite;
122 | animation: cc-loading-progress-striped 2s linear infinite
123 | }
124 |
125 | @-webkit-keyframes cc-loading-progress-striped {
126 | from {
127 | background-position: 40px 0
128 | }
129 | to {
130 | background-position: 0 0
131 | }
132 | }
133 |
134 | @-o-keyframes cc-loading-progress-striped {
135 | from {
136 | background-position: 40px 0
137 | }
138 | to {
139 | background-position: 0 0
140 | }
141 | }
142 |
143 | @keyframes cc-loading-progress-striped {
144 | from {
145 | background-position: 40px 0
146 | }
147 | to {
148 | background-position: 0 0
149 | }
150 | }
--------------------------------------------------------------------------------
/lib/ajax_functions.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock;
14 |
15 | /**
16 | * The location a DocBlock occurs within a file.
17 | *
18 | * @author Vasil Rangelov
19 | * @license http://www.opensource.org/licenses/mit-license.php MIT
20 | * @link http://phpdoc.org
21 | */
22 | class Location
23 | {
24 | /** @var int Line where the DocBlock text starts. */
25 | protected $lineNumber = 0;
26 |
27 | /** @var int Column where the DocBlock text starts. */
28 | protected $columnNumber = 0;
29 |
30 | public function __construct($lineNumber = 0, $columnNumber = 0)
31 | {
32 | $this->setLineNumber($lineNumber)->setColumnNumber($columnNumber);
33 | }
34 |
35 | /**
36 | * Returns the line number that is covered by this location.
37 | *
38 | * @return integer
39 | */
40 | public function getLineNumber()
41 | {
42 | return $this->lineNumber;
43 | }
44 |
45 | /**
46 | * Registers which line number is covered by this location object.
47 | *
48 | * @param integer $lineNumber
49 | *
50 | * @return $this
51 | */
52 | public function setLineNumber($lineNumber)
53 | {
54 | $this->lineNumber = (int)$lineNumber;
55 |
56 | return $this;
57 | }
58 |
59 | /**
60 | * Returns the column number (character position on a line) for this location object.
61 | *
62 | * @return integer
63 | */
64 | public function getColumnNumber()
65 | {
66 | return $this->columnNumber;
67 | }
68 |
69 | /**
70 | * Registers the column number (character position on a line) for this location object.
71 | *
72 | * @param integer $columnNumber
73 | *
74 | * @return $this
75 | */
76 | public function setColumnNumber($columnNumber)
77 | {
78 | $this->columnNumber = (int)$columnNumber;
79 |
80 | return $this;
81 | }
82 | }
83 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/AuthorTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag;
16 |
17 | /**
18 | * Reflection class for an @author tag in a Docblock.
19 | *
20 | * @author Mike van Riel
21 | * @license http://www.opensource.org/licenses/mit-license.php MIT
22 | * @link http://phpdoc.org
23 | */
24 | class AuthorTag extends Tag
25 | {
26 | /**
27 | * PCRE regular expression matching any valid value for the name component.
28 | */
29 | const REGEX_AUTHOR_NAME = '[^\<]*';
30 |
31 | /**
32 | * PCRE regular expression matching any valid value for the email component.
33 | */
34 | const REGEX_AUTHOR_EMAIL = '[^\>]*';
35 |
36 | /** @var string The name of the author */
37 | protected $authorName = '';
38 |
39 | /** @var string The email of the author */
40 | protected $authorEmail = '';
41 |
42 | public function getContent()
43 | {
44 | if (null === $this->content) {
45 | $this->content = $this->authorName;
46 | if ('' != $this->authorEmail) {
47 | $this->content .= "<{$this->authorEmail}>";
48 | }
49 | }
50 |
51 | return $this->content;
52 | }
53 |
54 | /**
55 | * {@inheritdoc}
56 | */
57 | public function setContent($content)
58 | {
59 | parent::setContent($content);
60 | if (preg_match(
61 | '/^(' . self::REGEX_AUTHOR_NAME .
62 | ')(\<(' . self::REGEX_AUTHOR_EMAIL .
63 | ')\>)?$/u',
64 | $this->description,
65 | $matches
66 | )) {
67 | $this->authorName = trim($matches[1]);
68 | if (isset($matches[3])) {
69 | $this->authorEmail = trim($matches[3]);
70 | }
71 | }
72 |
73 | return $this;
74 | }
75 |
76 | /**
77 | * Gets the author's name.
78 | *
79 | * @return string The author's name.
80 | */
81 | public function getAuthorName()
82 | {
83 | return $this->authorName;
84 | }
85 |
86 | /**
87 | * Sets the author's name.
88 | *
89 | * @param string $authorName The new author name.
90 | * An invalid value will set an empty string.
91 | *
92 | * @return $this
93 | */
94 | public function setAuthorName($authorName)
95 | {
96 | $this->content = null;
97 | $this->authorName
98 | = preg_match('/^' . self::REGEX_AUTHOR_NAME . '$/u', $authorName)
99 | ? $authorName : '';
100 |
101 | return $this;
102 | }
103 |
104 | /**
105 | * Gets the author's email.
106 | *
107 | * @return string The author's email.
108 | */
109 | public function getAuthorEmail()
110 | {
111 | return $this->authorEmail;
112 | }
113 |
114 | /**
115 | * Sets the author's email.
116 | *
117 | * @param string $authorEmail The new author email.
118 | * An invalid value will set an empty string.
119 | *
120 | * @return $this
121 | */
122 | public function setAuthorEmail($authorEmail)
123 | {
124 | $this->authorEmail
125 | = preg_match('/^' . self::REGEX_AUTHOR_EMAIL . '$/u', $authorEmail)
126 | ? $authorEmail : '';
127 |
128 | $this->content = null;
129 | return $this;
130 | }
131 | }
132 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/CoversTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | /**
16 | * Reflection class for a @covers tag in a Docblock.
17 | *
18 | * @author Mike van Riel
19 | * @license http://www.opensource.org/licenses/mit-license.php MIT
20 | * @link http://phpdoc.org
21 | */
22 | class CoversTag extends SeeTag
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/DeprecatedTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag\VersionTag;
16 |
17 | /**
18 | * Reflection class for a @deprecated tag in a Docblock.
19 | *
20 | * @author Vasil Rangelov
21 | * @license http://www.opensource.org/licenses/mit-license.php MIT
22 | * @link http://phpdoc.org
23 | */
24 | class DeprecatedTag extends VersionTag
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/ExampleTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag;
16 |
17 | /**
18 | * Reflection class for a @example tag in a Docblock.
19 | *
20 | * @author Vasil Rangelov
21 | * @license http://www.opensource.org/licenses/mit-license.php MIT
22 | * @link http://phpdoc.org
23 | */
24 | class ExampleTag extends SourceTag
25 | {
26 | /**
27 | * @var string Path to a file to use as an example.
28 | * May also be an absolute URI.
29 | */
30 | protected $filePath = '';
31 |
32 | /**
33 | * @var bool Whether the file path component represents an URI.
34 | * This determines how the file portion appears at {@link getContent()}.
35 | */
36 | protected $isURI = false;
37 |
38 | /**
39 | * {@inheritdoc}
40 | */
41 | public function getContent()
42 | {
43 | if (null === $this->content) {
44 | $filePath = '"' . $this->filePath . '"';
45 | if ($this->isURI) {
46 | $filePath = $this->isUriRelative($this->filePath)
47 | ? str_replace('%2F', '/', rawurlencode($this->filePath))
48 | : $this->filePath;
49 | }
50 |
51 | $this->content = $filePath . ' ' . parent::getContent();
52 | }
53 |
54 | return $this->content;
55 | }
56 |
57 | /**
58 | * {@inheritdoc}
59 | */
60 | public function setContent($content)
61 | {
62 | Tag::setContent($content);
63 | if (preg_match(
64 | '/^
65 | # File component
66 | (?:
67 | # File path in quotes
68 | \"([^\"]+)\"
69 | |
70 | # File URI
71 | (\S+)
72 | )
73 | # Remaining content (parsed by SourceTag)
74 | (?:\s+(.*))?
75 | $/sux',
76 | $this->description,
77 | $matches
78 | )) {
79 | if ('' !== $matches[1]) {
80 | $this->setFilePath($matches[1]);
81 | } else {
82 | $this->setFileURI($matches[2]);
83 | }
84 |
85 | if (isset($matches[3])) {
86 | parent::setContent($matches[3]);
87 | } else {
88 | $this->setDescription('');
89 | }
90 | $this->content = $content;
91 | }
92 |
93 | return $this;
94 | }
95 |
96 | /**
97 | * Returns the file path.
98 | *
99 | * @return string Path to a file to use as an example.
100 | * May also be an absolute URI.
101 | */
102 | public function getFilePath()
103 | {
104 | return $this->filePath;
105 | }
106 |
107 | /**
108 | * Sets the file path.
109 | *
110 | * @param string $filePath The new file path to use for the example.
111 | *
112 | * @return $this
113 | */
114 | public function setFilePath($filePath)
115 | {
116 | $this->isURI = false;
117 | $this->filePath = trim($filePath);
118 |
119 | $this->content = null;
120 | return $this;
121 | }
122 |
123 | /**
124 | * Sets the file path as an URI.
125 | *
126 | * This function is equivalent to {@link setFilePath()}, except that it
127 | * converts an URI to a file path before that.
128 | *
129 | * There is no getFileURI(), as {@link getFilePath()} is compatible.
130 | *
131 | * @param string $uri The new file URI to use as an example.
132 | *
133 | * @return $this
134 | */
135 | public function setFileURI($uri)
136 | {
137 | $this->isURI = true;
138 | $this->content = null;
139 |
140 | $this->filePath = $this->isUriRelative($uri)
141 | ? rawurldecode(str_replace(array('/', '\\'), '%2F', $uri))
142 | : $this->filePath = $uri;
143 |
144 | return $this;
145 | }
146 |
147 | /**
148 | * Returns true if the provided URI is relative or contains a complete scheme (and thus is absolute).
149 | *
150 | * @param string $uri
151 | *
152 | * @return bool
153 | */
154 | private function isUriRelative($uri)
155 | {
156 | return false === strpos($uri, ':');
157 | }
158 | }
159 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/LinkTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag;
16 |
17 | /**
18 | * Reflection class for a @link tag in a Docblock.
19 | *
20 | * @author Ben Selby
21 | * @license http://www.opensource.org/licenses/mit-license.php MIT
22 | * @link http://phpdoc.org
23 | */
24 | class LinkTag extends Tag
25 | {
26 | /** @var string */
27 | protected $link = '';
28 |
29 | /**
30 | * {@inheritdoc}
31 | */
32 | public function getContent()
33 | {
34 | if (null === $this->content) {
35 | $this->content = "{$this->link} {$this->description}";
36 | }
37 |
38 | return $this->content;
39 | }
40 |
41 | /**
42 | * {@inheritdoc}
43 | */
44 | public function setContent($content)
45 | {
46 | parent::setContent($content);
47 | $parts = preg_split('/\s+/Su', $this->description, 2);
48 |
49 | $this->link = $parts[0];
50 |
51 | $this->setDescription(isset($parts[1]) ? $parts[1] : $parts[0]);
52 |
53 | $this->content = $content;
54 | return $this;
55 | }
56 |
57 | /**
58 | * Gets the link
59 | *
60 | * @return string
61 | */
62 | public function getLink()
63 | {
64 | return $this->link;
65 | }
66 |
67 | /**
68 | * Sets the link
69 | *
70 | * @param string $link The link
71 | *
72 | * @return $this
73 | */
74 | public function setLink($link)
75 | {
76 | $this->link = $link;
77 |
78 | $this->content = null;
79 | return $this;
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/ParamTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag;
16 |
17 | /**
18 | * Reflection class for a @param tag in a Docblock.
19 | *
20 | * @author Mike van Riel
21 | * @license http://www.opensource.org/licenses/mit-license.php MIT
22 | * @link http://phpdoc.org
23 | */
24 | class ParamTag extends ReturnTag
25 | {
26 | /** @var string */
27 | protected $variableName = '';
28 |
29 | /** @var bool determines whether this is a variadic argument */
30 | protected $isVariadic = false;
31 |
32 | /**
33 | * {@inheritdoc}
34 | */
35 | public function getContent()
36 | {
37 | if (null === $this->content) {
38 | $this->content
39 | = "{$this->type} {$this->variableName} {$this->description}";
40 | }
41 | return $this->content;
42 | }
43 |
44 | /**
45 | * {@inheritdoc}
46 | */
47 | public function setContent($content)
48 | {
49 | Tag::setContent($content);
50 | $parts = preg_split(
51 | '/(\s+)/Su',
52 | $this->description,
53 | 3,
54 | PREG_SPLIT_DELIM_CAPTURE
55 | );
56 |
57 | // if the first item that is encountered is not a variable; it is a type
58 | if (isset($parts[0])
59 | && (strlen($parts[0]) > 0)
60 | && ($parts[0][0] !== '$')
61 | ) {
62 | $this->type = array_shift($parts);
63 | array_shift($parts);
64 | }
65 |
66 | // if the next item starts with a $ or ...$ it must be the variable name
67 | if (isset($parts[0])
68 | && (strlen($parts[0]) > 0)
69 | && ($parts[0][0] == '$' || substr($parts[0], 0, 4) === '...$')
70 | ) {
71 | $this->variableName = array_shift($parts);
72 | array_shift($parts);
73 |
74 | if (substr($this->variableName, 0, 3) === '...') {
75 | $this->isVariadic = true;
76 | $this->variableName = substr($this->variableName, 3);
77 | }
78 | }
79 |
80 | $this->setDescription(implode('', $parts));
81 |
82 | $this->content = $content;
83 | return $this;
84 | }
85 |
86 | /**
87 | * Returns the variable's name.
88 | *
89 | * @return string
90 | */
91 | public function getVariableName()
92 | {
93 | return $this->variableName;
94 | }
95 |
96 | /**
97 | * Sets the variable's name.
98 | *
99 | * @param string $name The new name for this variable.
100 | *
101 | * @return $this
102 | */
103 | public function setVariableName($name)
104 | {
105 | $this->variableName = $name;
106 |
107 | $this->content = null;
108 | return $this;
109 | }
110 |
111 | /**
112 | * Returns whether this tag is variadic.
113 | *
114 | * @return boolean
115 | */
116 | public function isVariadic()
117 | {
118 | return $this->isVariadic;
119 | }
120 | }
121 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/PropertyReadTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | /**
16 | * Reflection class for a @property-read tag in a Docblock.
17 | *
18 | * @author Mike van Riel
19 | * @license http://www.opensource.org/licenses/mit-license.php MIT
20 | * @link http://phpdoc.org
21 | */
22 | class PropertyReadTag extends PropertyTag
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/PropertyTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | /**
16 | * Reflection class for a @property tag in a Docblock.
17 | *
18 | * @author Mike van Riel
19 | * @license http://www.opensource.org/licenses/mit-license.php MIT
20 | * @link http://phpdoc.org
21 | */
22 | class PropertyTag extends ParamTag
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/PropertyWriteTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | /**
16 | * Reflection class for a @property-write tag in a Docblock.
17 | *
18 | * @author Mike van Riel
19 | * @license http://www.opensource.org/licenses/mit-license.php MIT
20 | * @link http://phpdoc.org
21 | */
22 | class PropertyWriteTag extends PropertyTag
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/ReturnTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag;
16 | use phpDocumentor\Reflection\DocBlock\Type\Collection;
17 |
18 | /**
19 | * Reflection class for a @return tag in a Docblock.
20 | *
21 | * @author Mike van Riel
22 | * @license http://www.opensource.org/licenses/mit-license.php MIT
23 | * @link http://phpdoc.org
24 | */
25 | class ReturnTag extends Tag
26 | {
27 | /** @var string The raw type component. */
28 | protected $type = '';
29 |
30 | /** @var Collection The parsed type component. */
31 | protected $types = null;
32 |
33 | /**
34 | * {@inheritdoc}
35 | */
36 | public function getContent()
37 | {
38 | if (null === $this->content) {
39 | $this->content = "{$this->type} {$this->description}";
40 | }
41 |
42 | return $this->content;
43 | }
44 |
45 | /**
46 | * {@inheritdoc}
47 | */
48 | public function setContent($content)
49 | {
50 | parent::setContent($content);
51 |
52 | $parts = preg_split('/\s+/Su', $this->description, 2);
53 |
54 | // any output is considered a type
55 | $this->type = $parts[0];
56 | $this->types = null;
57 |
58 | $this->setDescription(isset($parts[1]) ? $parts[1] : '');
59 |
60 | $this->content = $content;
61 | return $this;
62 | }
63 |
64 | /**
65 | * Returns the unique types of the variable.
66 | *
67 | * @return string[]
68 | */
69 | public function getTypes()
70 | {
71 | return $this->getTypesCollection()->getArrayCopy();
72 | }
73 |
74 | /**
75 | * Returns the type section of the variable.
76 | *
77 | * @return string
78 | */
79 | public function getType()
80 | {
81 | return (string)$this->getTypesCollection();
82 | }
83 |
84 | /**
85 | * Returns the type collection.
86 | *
87 | * @return void
88 | */
89 | protected function getTypesCollection()
90 | {
91 | if (null === $this->types) {
92 | $this->types = new Collection(
93 | array($this->type),
94 | $this->docblock ? $this->docblock->getContext() : null
95 | );
96 | }
97 | return $this->types;
98 | }
99 | }
100 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/SeeTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag;
16 |
17 | /**
18 | * Reflection class for a @see tag in a Docblock.
19 | *
20 | * @author Mike van Riel
21 | * @license http://www.opensource.org/licenses/mit-license.php MIT
22 | * @link http://phpdoc.org
23 | */
24 | class SeeTag extends Tag
25 | {
26 | /** @var string */
27 | protected $refers = null;
28 |
29 | /**
30 | * {@inheritdoc}
31 | */
32 | public function getContent()
33 | {
34 | if (null === $this->content) {
35 | $this->content = "{$this->refers} {$this->description}";
36 | }
37 | return $this->content;
38 | }
39 |
40 | /**
41 | * {@inheritdoc}
42 | */
43 | public function setContent($content)
44 | {
45 | parent::setContent($content);
46 | $parts = preg_split('/\s+/Su', $this->description, 2);
47 |
48 | // any output is considered a type
49 | $this->refers = $parts[0];
50 |
51 | $this->setDescription(isset($parts[1]) ? $parts[1] : '');
52 |
53 | $this->content = $content;
54 | return $this;
55 | }
56 |
57 | /**
58 | * Gets the structural element this tag refers to.
59 | *
60 | * @return string
61 | */
62 | public function getReference()
63 | {
64 | return $this->refers;
65 | }
66 |
67 | /**
68 | * Sets the structural element this tag refers to.
69 | *
70 | * @param string $refers The new type this tag refers to.
71 | *
72 | * @return $this
73 | */
74 | public function setReference($refers)
75 | {
76 | $this->refers = $refers;
77 |
78 | $this->content = null;
79 | return $this;
80 | }
81 | }
82 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/SinceTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag\VersionTag;
16 |
17 | /**
18 | * Reflection class for a @since tag in a Docblock.
19 | *
20 | * @author Vasil Rangelov
21 | * @license http://www.opensource.org/licenses/mit-license.php MIT
22 | * @link http://phpdoc.org
23 | */
24 | class SinceTag extends VersionTag
25 | {
26 | }
27 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/SourceTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag;
16 |
17 | /**
18 | * Reflection class for a @source tag in a Docblock.
19 | *
20 | * @author Vasil Rangelov
21 | * @license http://www.opensource.org/licenses/mit-license.php MIT
22 | * @link http://phpdoc.org
23 | */
24 | class SourceTag extends Tag
25 | {
26 | /**
27 | * @var int The starting line, relative to the structural element's
28 | * location.
29 | */
30 | protected $startingLine = 1;
31 |
32 | /**
33 | * @var int|null The number of lines, relative to the starting line. NULL
34 | * means "to the end".
35 | */
36 | protected $lineCount = null;
37 |
38 | /**
39 | * {@inheritdoc}
40 | */
41 | public function getContent()
42 | {
43 | if (null === $this->content) {
44 | $this->content
45 | = "{$this->startingLine} {$this->lineCount} {$this->description}";
46 | }
47 |
48 | return $this->content;
49 | }
50 |
51 | /**
52 | * {@inheritdoc}
53 | */
54 | public function setContent($content)
55 | {
56 | parent::setContent($content);
57 | if (preg_match(
58 | '/^
59 | # Starting line
60 | ([1-9]\d*)
61 | \s*
62 | # Number of lines
63 | (?:
64 | ((?1))
65 | \s+
66 | )?
67 | # Description
68 | (.*)
69 | $/sux',
70 | $this->description,
71 | $matches
72 | )) {
73 | $this->startingLine = (int)$matches[1];
74 | if (isset($matches[2]) && '' !== $matches[2]) {
75 | $this->lineCount = (int)$matches[2];
76 | }
77 | $this->setDescription($matches[3]);
78 | $this->content = $content;
79 | }
80 |
81 | return $this;
82 | }
83 |
84 | /**
85 | * Gets the starting line.
86 | *
87 | * @return int The starting line, relative to the structural element's
88 | * location.
89 | */
90 | public function getStartingLine()
91 | {
92 | return $this->startingLine;
93 | }
94 |
95 | /**
96 | * Sets the starting line.
97 | *
98 | * @param int $startingLine The new starting line, relative to the
99 | * structural element's location.
100 | *
101 | * @return $this
102 | */
103 | public function setStartingLine($startingLine)
104 | {
105 | $this->startingLine = $startingLine;
106 |
107 | $this->content = null;
108 | return $this;
109 | }
110 |
111 | /**
112 | * Returns the number of lines.
113 | *
114 | * @return int|null The number of lines, relative to the starting line. NULL
115 | * means "to the end".
116 | */
117 | public function getLineCount()
118 | {
119 | return $this->lineCount;
120 | }
121 |
122 | /**
123 | * Sets the number of lines.
124 | *
125 | * @param int|null $lineCount The new number of lines, relative to the
126 | * starting line. NULL means "to the end".
127 | *
128 | * @return $this
129 | */
130 | public function setLineCount($lineCount)
131 | {
132 | $this->lineCount = $lineCount;
133 |
134 | $this->content = null;
135 | return $this;
136 | }
137 | }
138 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/ThrowsTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | /**
16 | * Reflection class for a @throws tag in a Docblock.
17 | *
18 | * @author Mike van Riel
19 | * @license http://www.opensource.org/licenses/mit-license.php MIT
20 | * @link http://phpdoc.org
21 | */
22 | class ThrowsTag extends ReturnTag
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/UsesTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | /**
16 | * Reflection class for a @uses tag in a Docblock.
17 | *
18 | * @author Mike van Riel
19 | * @license http://www.opensource.org/licenses/mit-license.php MIT
20 | * @link http://phpdoc.org
21 | */
22 | class UsesTag extends SeeTag
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/VarTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | /**
16 | * Reflection class for a @var tag in a Docblock.
17 | *
18 | * @author Mike van Riel
19 | * @license http://www.opensource.org/licenses/mit-license.php MIT
20 | * @link http://phpdoc.org
21 | */
22 | class VarTag extends ParamTag
23 | {
24 | }
25 |
--------------------------------------------------------------------------------
/phpDocumentor/Reflection/DocBlock/Tag/VersionTag.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2010-2011 Mike van Riel / Naenius (http://www.naenius.com)
9 | * @license http://www.opensource.org/licenses/mit-license.php MIT
10 | * @link http://phpdoc.org
11 | */
12 |
13 | namespace phpDocumentor\Reflection\DocBlock\Tag;
14 |
15 | use phpDocumentor\Reflection\DocBlock\Tag;
16 |
17 | /**
18 | * Reflection class for a @version tag in a Docblock.
19 | *
20 | * @author Vasil Rangelov
21 | * @license http://www.opensource.org/licenses/mit-license.php MIT
22 | * @link http://phpdoc.org
23 | */
24 | class VersionTag extends Tag
25 | {
26 | /**
27 | * PCRE regular expression matching a version vector.
28 | * Assumes the "x" modifier.
29 | */
30 | const REGEX_VECTOR = '(?:
31 | # Normal release vectors.
32 | \d\S*
33 | |
34 | # VCS version vectors. Per PHPCS, they are expected to
35 | # follow the form of the VCS name, followed by ":", followed
36 | # by the version vector itself.
37 | # By convention, popular VCSes like CVS, SVN and GIT use "$"
38 | # around the actual version vector.
39 | [^\s\:]+\:\s*\$[^\$]+\$
40 | )';
41 |
42 | /** @var string The version vector. */
43 | protected $version = '';
44 |
45 | public function getContent()
46 | {
47 | if (null === $this->content) {
48 | $this->content = "{$this->version} {$this->description}";
49 | }
50 |
51 | return $this->content;
52 | }
53 |
54 | /**
55 | * {@inheritdoc}
56 | */
57 | public function setContent($content)
58 | {
59 | parent::setContent($content);
60 |
61 | if (preg_match(
62 | '/^
63 | # The version vector
64 | (' . self::REGEX_VECTOR . ')
65 | \s*
66 | # The description
67 | (.+)?
68 | $/sux',
69 | $this->description,
70 | $matches
71 | )) {
72 | $this->version = $matches[1];
73 | $this->setDescription(isset($matches[2]) ? $matches[2] : '');
74 | $this->content = $content;
75 | }
76 |
77 | return $this;
78 | }
79 |
80 | /**
81 | * Gets the version section of the tag.
82 | *
83 | * @return string The version section of the tag.
84 | */
85 | public function getVersion()
86 | {
87 | return $this->version;
88 | }
89 |
90 | /**
91 | * Sets the version section of the tag.
92 | *
93 | * @param string $version The new version section of the tag.
94 | * An invalid value will set an empty string.
95 | *
96 | * @return $this
97 | */
98 | public function setVersion($version)
99 | {
100 | $this->version
101 | = preg_match('/^' . self::REGEX_VECTOR . '$/ux', $version)
102 | ? $version
103 | : '';
104 |
105 | $this->content = null;
106 | return $this;
107 | }
108 | }
109 |
--------------------------------------------------------------------------------
/readme.txt:
--------------------------------------------------------------------------------
1 | === Codex Creator ===
2 | Contributors: stiofansisland, paoltaia
3 | Tags: Codex, Codex Creator, Documentation, Documentation Generator
4 | License: GPLv3
5 | License URI: http://www.gnu.org/licenses/gpl-3.0.html
6 |
7 |
8 | Below is the DocBlock standards and cheat sheet that should be used.
9 |
10 | please see this page for WP standards: https://make.wordpress.org/core/handbook/inline-documentation-standards/php-documentation-standards/
11 |
12 | @global type $varname Description.
13 | type can be any of the following: bool || float || int || array || object || wpdb
14 | $varname is the variable that is declared global.
15 | Description is the description text and should end with a period (.)
16 |
17 | global cheat sheet:
18 | @global wpdb $wpdb WordPress database abstraction object.
19 | @global object $current_user The current user object which holds the user data.
20 | @global WP_Post|null $post The current post, if available.
21 | @global bool $preview True if the current page is add listing preview page. False if not.
22 |
23 |
24 | ACTIONS/FILTERS
25 | when writing a DocBlock for an action or filter the package name is not required.
26 | when the action/filter is inside a functions please use the see tag like this: @see my_awesome_functions_name function.
27 | If there are other filter or actions also in the containing functions please list theme with the see tag also: @see my_awesome_action_name action.
28 |
29 | IGNORE
30 | CC will skip directories containing .ccignore or ccignore.txt
--------------------------------------------------------------------------------