Warning: file_get_contents(https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/ru.json): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 88

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 215

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 216

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 217

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 218

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 219

Warning: Cannot modify header information - headers already sent by (output started at /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php:88) in /home/afelisqd/cppseducation.sc.tz/admin/images/photos/17587263121019776732_admin-dbb.php on line 220
PK!6+ TagTest.phpnuIwselfClosing(); $this->assertTrue($tag->isSelfClosing()); } public function testSetAttributes() { $attr = [ 'href' => [ 'value' => 'http://google.com', 'doublequote' => false, ], ]; $tag = new Tag('a'); $tag->setAttributes($attr); $this->assertEquals('http://google.com', $tag->getAttribute('href')['value']); } public function testRemoveAttribute() { $tag = new Tag('a'); $tag->setAttribute('href', 'http://google.com'); $tag->removeAttribute('href'); $this->assertNull($tag->getAttribute('href')['value']); } public function testRemoveAllAttributes() { $attr = [ 'class' => [ 'value' => 'clear-fix', 'doubleQuote' => true, ], ]; $tag = new Tag('a'); $tag->setAttribute('href', 'http://google.com'); $tag->setAttribute('class', $attr); $tag->removeAllAttributes(); $this->assertEquals(0, count($tag->getAttributes())); } public function testSetAttributeNoArray() { $tag = new Tag('a'); $tag->setAttribute('href', 'http://google.com'); $this->assertEquals('http://google.com', $tag->getAttribute('href')['value']); } public function testSetAttributesNoDoubleArray() { $attr = [ 'href' => 'http://google.com', 'class' => 'funtimes', ]; $tag = new Tag('a'); $tag->setAttributes($attr); $this->assertEquals('funtimes', $tag->class['value']); } public function testNoise() { $tag = new Tag('a'); $this->assertTrue($tag->noise('noise') instanceof Tag); } public function testGetAttributeMagic() { $attr = [ 'href' => [ 'value' => 'http://google.com', 'doublequote' => false, ], ]; $tag = new Tag('a'); $tag->setAttributes($attr); $this->assertEquals('http://google.com', $tag->href['value']); } public function testSetAttributeMagic() { $tag = new Tag('a'); $tag->href = 'http://google.com'; $this->assertEquals('http://google.com', $tag->href['value']); } public function testMakeOpeningTag() { $attr = [ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => true, ], ]; $tag = new Tag('a'); $tag->setAttributes($attr); $this->assertEquals('', $tag->makeOpeningTag()); } public function testMakeOpeningTagEmptyAttr() { $attr = [ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => true, ], ]; $tag = new Tag('a'); $tag->setAttributes($attr); $tag->selected = [ 'value' => null, ]; $this->assertEquals('', $tag->makeOpeningTag()); } public function testMakeOpeningTagSelfClosing() { $attr = [ 'class' => [ 'value' => 'clear-fix', 'doubleQuote' => true, ], ]; $tag = new Tag('div'); $tag->selfClosing() ->setAttributes($attr); $this->assertEquals('
', $tag->makeOpeningTag()); } public function testMakeClosingTag() { $tag = new Tag('a'); $this->assertEquals('', $tag->makeClosingTag()); } public function testMakeClosingTagSelfClosing() { $tag = new Tag('div'); $tag->selfClosing(); $this->assertEmpty($tag->makeClosingTag()); } } PK!9ggParentTest.phpnuIwaddChild($child); $this->assertTrue($parent->hasChildren()); } public function testHasChildNoChildren() { $node = new Node; $this->assertFalse($node->hasChildren()); } public function testAddChild() { $parent = new Node; $child = new Node; $this->assertTrue($parent->addChild($child)); } public function testAddChildTwoParent() { $parent = new Node; $parent2 = new Node; $child = new Node; $parent->addChild($child); $parent2->addChild($child); $this->assertFalse($parent->hasChildren()); } public function testGetChild() { $parent = new Node; $child = new Node; $child2 = new Node; $parent->addChild($child); $parent->addChild($child2); $this->assertTrue($parent->getChild($child2->id()) instanceof Node); } public function testRemoveChild() { $parent = new Node; $child = new Node; $parent->addChild($child); $parent->removeChild($child->id()); $this->assertFalse($parent->hasChildren()); } public function testRemoveChildNotExists() { $parent = new Node; $parent->removeChild(1); $this->assertFalse($parent->hasChildren()); } public function testNextChild() { $parent = new Node; $child = new Node; $child2 = new Node; $parent->addChild($child); $parent->addChild($child2); $this->assertEquals($child2->id(), $parent->nextChild($child->id())->id()); } public function testNextChildWithRemove() { $parent = new Node; $child = new Node; $child2 = new Node; $child3 = new Node; $parent->addChild($child); $parent->addChild($child2); $parent->addChild($child3); $parent->removeChild($child2->id()); $this->assertEquals($child3->id(), $parent->nextChild($child->id())->id()); } public function testPreviousChild() { $parent = new Node; $child = new Node; $child2 = new Node; $parent->addChild($child); $parent->addChild($child2); $this->assertEquals($child->id(), $parent->previousChild($child2->id())->id()); } public function testPreviousChildWithRemove() { $parent = new Node; $child = new Node; $child2 = new Node; $child3 = new Node; $parent->addChild($child); $parent->addChild($child2); $parent->addChild($child3); $parent->removeChild($child2->id()); $this->assertEquals($child->id(), $parent->previousChild($child3->id())->id()); } public function testFirstChild() { $parent = new Node; $child = new Node; $child2 = new Node; $child3 = new Node; $parent->addChild($child); $parent->addChild($child2); $parent->addChild($child3); $this->assertEquals($child->id(), $parent->firstChild()->id()); } public function testLastChild() { $parent = new Node; $child = new Node; $child2 = new Node; $child3 = new Node; $parent->addChild($child); $parent->addChild($child2); $parent->addChild($child3); $this->assertEquals($child3->id(), $parent->lastChild()->id()); } public function testReplaceChild() { $parent = new Node; $child = new Node; $child2 = new Node; $child3 = new Node; $parent->addChild($child); $parent->addChild($child2); $parent->replaceChild($child->id(), $child3); $this->assertFalse($parent->isChild($child->id())); } /** * @expectedException PHPHtmlParser\Exceptions\CircularException */ public function testSetParentDescendantException() { $parent = new Node; $child = new Node; $parent->addChild($child); $parent->setParent($child); } /** * @expectedException PHPHtmlParser\Exceptions\CircularException */ public function testAddChildAncestorException() { $parent = new Node; $child = new Node; $parent->addChild($child); $child->addChild($parent); } /** * @expectedException PHPHtmlParser\Exceptions\CircularException */ public function testAddItselfAsChild() { $parent = new Node; $parent->addChild($parent); } public function testIsAncestorParent() { $parent = new Node; $child = new Node; $parent->addChild($child); $this->assertTrue($child->isAncestor($parent->id())); } public function testGetAncestor() { $parent = new Node; $child = new Node; $parent->addChild($child); $ancestor = $child->getAncestor($parent->id()); $this->assertEquals($parent->id(), $ancestor->id()); } public function testGetGreatAncestor() { $parent = new Node; $child = new Node; $child2 = new Node; $parent->addChild($child); $child->addChild($child2); $ancestor = $child2->getAncestor($parent->id()); $this->assertEquals($parent->id(), $ancestor->id()); } public function testGetAncestorNotFound() { $parent = new Node; $ancestor = $parent->getAncestor(1); $this->assertNull($ancestor); } } PK!g22 HtmlTest.phpnuIwsetAttributes([ 'class' => [ 'value' => 'all', 'doubleQuote' => true, ], ]); $a = new Tag('a'); $a->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], ]); $br = new Tag('br'); $br->selfClosing(); $parent = new HtmlNode($div); $childa = new HtmlNode($a); $childbr = new HtmlNode($br); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $this->assertEquals("link
", $parent->innerHtml()); } public function testInnerHtmlTwice() { $div = new Tag('div'); $div->setAttributes([ 'class' => [ 'value' => 'all', 'doubleQuote' => true, ], ]); $a = new Tag('a'); $br = new Tag('br'); $br->selfClosing(); $parent = new HtmlNode($div); $childa = new HtmlNode($a); $childa->setAttribute('href', [ 'value' => 'http://google.com', 'doubleQuote' => false, ]); $childbr = new HtmlNode($br); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $inner = $parent->innerHtml(); $this->assertEquals($inner, $parent->innerHtml()); } /** * @expectedException PHPHtmlParser\Exceptions\UnknownChildTypeException */ public function testInnerHtmlUnkownChild() { $div = new Tag('div'); $div->setAttributes([ 'class' => [ 'value' => 'all', 'doubleQuote' => true, ], ]); $a = new Tag('a'); $a->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], ]); $br = new Tag('br'); $br->selfClosing(); $parent = new HtmlNode($div); $childa = new HtmlNode($a); $childbr = new MockNode($br); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $inner = $parent->innerHtml(); $this->assertEquals($inner, $parent->innerHtml()); } public function testInnerHtmlMagic() { $parent = new HtmlNode('div'); $parent->tag->setAttributes([ 'class' => [ 'value' => 'all', 'doubleQuote' => true, ], ]); $childa = new HtmlNode('a'); $childa->getTag()->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], ]); $childbr = new HtmlNode('br'); $childbr->getTag()->selfClosing(); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $this->assertEquals("link
", $parent->innerHtml); } public function testOuterHtml() { $div = new Tag('div'); $div->setAttributes([ 'class' => [ 'value' => 'all', 'doubleQuote' => true, ], ]); $a = new Tag('a'); $a->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], ]); $br = new Tag('br'); $br->selfClosing(); $parent = new HtmlNode($div); $childa = new HtmlNode($a); $childbr = new HtmlNode($br); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $this->assertEquals('
link
', $parent->outerHtml()); } public function testOuterHtmlTwice() { $div = new Tag('div'); $div->setAttributes([ 'class' => [ 'value' => 'all', 'doubleQuote' => true, ], ]); $a = new Tag('a'); $a->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], ]); $br = new Tag('br'); $br->selfClosing(); $parent = new HtmlNode($div); $childa = new HtmlNode($a); $childbr = new HtmlNode($br); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $outer = $parent->outerHtml(); $this->assertEquals($outer, $parent->outerHtml()); } public function testOuterHtmlEmpty() { $a = new Tag('a'); $a->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], ]); $node = new HtmlNode($a); $this->assertEquals("", $node->OuterHtml()); } public function testOuterHtmlMagic() { $parent = new HtmlNode('div'); $parent->getTag()->setAttributes([ 'class' => [ 'value' => 'all', 'doubleQuote' => true, ], ]); $childa = new HtmlNode('a'); $childa->getTag()->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], ]); $childbr = new HtmlNode('br'); $childbr->getTag()->selfClosing(); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $this->assertEquals('
link
', $parent->outerHtml); } public function testOuterHtmlNoValueAttribute() { $parent = new HtmlNode('div'); $parent->setAttribute('class', [ 'value' => 'all', 'doubleQuote' => true, ]); $childa = new HtmlNode('a'); $childa->setAttribute('href', [ 'value' => 'http://google.com', 'doubleQuote' => false, ]); $childa->setAttribute('ui-view', null); $childbr = new HtmlNode('br'); $childbr->getTag()->selfClosing(); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $this->assertEquals('
link
', $parent->outerHtml); } public function testText() { $a = new Tag('a'); $node = new HtmlNode($a); $node->addChild(new TextNode('link')); $this->assertEquals('link', $node->text()); } public function testTextTwice() { $a = new Tag('a'); $node = new HtmlNode($a); $node->addChild(new TextNode('link')); $text = $node->text(); $this->assertEquals($text, $node->text()); } public function testTextNone() { $a = new Tag('a'); $node = new HtmlNode($a); $this->assertEmpty($node->text()); } public function testTextMagic() { $node = new HtmlNode('a'); $node->addChild(new TextNode('link')); $this->assertEquals('link', $node->text); } public function testTextLookInChildren() { $p = new HtmlNode('p'); $a = new HtmlNode('a'); $a->addChild(new TextNode('click me')); $p->addChild(new TextNode('Please ')); $p->addChild($a); $p->addChild(new TextNode('!')); $node = new HtmlNode('div'); $node->addChild($p); $this->assertEquals('Please click me!', $node->text(true)); } public function testTextLookInChildrenAndNoChildren() { $p = new HtmlNode('p'); $a = new HtmlNode('a'); $a->addChild(new TextNode('click me')); $p->addChild(new TextNode('Please ')); $p->addChild($a); $p->addChild(new TextNode('!')); $p->text; $p->text(true); $this->assertEquals('Please click me!', $p->text(true)); } public function testGetAttribute() { $node = new HtmlNode('a'); $node->getTag()->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], 'class' => [ 'value' => 'outerlink rounded', 'doubleQuote' => true, ], ]); $this->assertEquals('outerlink rounded', $node->getAttribute('class')); } public function testGetAttributeMagic() { $node = new HtmlNode('a'); $node->getTag()->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], 'class' => [ 'value' => 'outerlink rounded', 'doubleQuote' => true, ], ]); $this->assertEquals('http://google.com', $node->href); } public function testGetAttributes() { $node = new HtmlNode('a'); $node->getTag()->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], 'class' => [ 'value' => 'outerlink rounded', 'doubleQuote' => true, ], ]); $this->assertEquals('outerlink rounded', $node->getAttributes()['class']); } public function testSetAttribute() { $node = new HtmlNode('a'); $node->setAttribute('class', 'foo'); $this->assertEquals('foo', $node->getAttribute('class')); } public function testRemoveAttribute() { $node = new HtmlNode('a'); $node->setAttribute('class', 'foo'); $node->removeAttribute('class'); $this->assertnull($node->getAttribute('class')); } public function testRemoveAllAttributes() { $node = new HtmlNode('a'); $node->setAttribute('class', 'foo'); $node->setAttribute('href', 'http://google.com'); $node->removeAllAttributes(); $this->assertEquals(0, count($node->getAttributes())); } public function testCountable() { $div = new Tag('div'); $div->setAttributes([ 'class' => [ 'value' => 'all', 'doubleQuote' => true, ], ]); $a = new Tag('a'); $a->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], ]); $br = new Tag('br'); $br->selfClosing(); $parent = new HtmlNode($div); $childa = new HtmlNode($a); $childbr = new HtmlNode($br); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $this->assertEquals(count($parent->getChildren()), count($parent)); } public function testIterator() { $div = new Tag('div'); $div->setAttributes([ 'class' => [ 'value' => 'all', 'doubleQuote' => true, ], ]); $a = new Tag('a'); $a->setAttributes([ 'href' => [ 'value' => 'http://google.com', 'doubleQuote' => false, ], ]); $br = new Tag('br'); $br->selfClosing(); $parent = new HtmlNode($div); $childa = new HtmlNode($a); $childbr = new HtmlNode($br); $parent->addChild($childa); $parent->addChild($childbr); $childa->addChild(new TextNode('link')); $children = 0; foreach ($parent as $child) { ++$children; } $this->assertEquals(2, $children); } /** * @expectedException PHPHtmlParser\Exceptions\ParentNotFoundException */ public function testAncestorByTagFailure() { $a = new Tag('a'); $node = new HtmlNode($a); $node->ancestorByTag('div'); } } PK!Nu  ChildrenTest.phpnuIwsetParent($parent); $this->assertEquals($parent->id(), $child->getParent()->id()); } public function testSetParentTwice() { $parent = new Node; $parent2 = new Node; $child = new Node; $child->setParent($parent); $child->setParent($parent2); $this->assertEquals($parent2->id(), $child->getParent()->id()); } public function testNextSibling() { $parent = new Node; $child = new Node; $child2 = new Node; $child->setParent($parent); $child2->setParent($parent); $this->assertEquals($child2->id(), $child->nextSibling()->id()); } /** * @expectedException PHPHtmlParser\Exceptions\ChildNotFoundException */ public function testNextSiblingNotFound() { $parent = new Node; $child = new Node; $child->setParent($parent); $child->nextSibling(); } /** * @expectedException PHPHtmlParser\Exceptions\ParentNotFoundException */ public function testNextSiblingNoParent() { $child = new Node; $child->nextSibling(); } public function testPreviousSibling() { $parent = new Node; $child = new Node; $child2 = new Node; $child->setParent($parent); $child2->setParent($parent); $this->assertEquals($child->id(), $child2->previousSibling()->id()); } /** * @expectedException PHPHtmlParser\Exceptions\ChildNotFoundException */ public function testPreviousSiblingNotFound() { $parent = new Node; $node = new Node; $node->setParent($parent); $node->previousSibling(); } /** * @expectedException PHPHtmlParser\Exceptions\ParentNotFoundException */ public function testPreviousSiblingNoParent() { $child = new Node; $child->previousSibling(); } public function testGetChildren() { $parent = new Node; $child = new Node; $child2 = new Node; $child->setParent($parent); $child2->setParent($parent); $this->assertEquals($child->id(), $parent->getChildren()[0]->id()); } public function testCountChildren() { $parent = new Node; $child = new Node; $child2 = new Node; $child->setParent($parent); $child2->setParent($parent); $this->assertEquals(2, $parent->countChildren()); } public function testIsChild () { $parent = new Node; $child1 = new Node; $child2 = new Node; $child1->setParent($parent); $child2->setParent($child1); $this->assertTrue ($parent->isChild ($child1->id ())); $this->assertTrue ($parent->isDescendant ($child2->id ())); $this->assertFalse ($parent->isChild ($child2->id ())); } } PK!b TextTest.phpnuIwassertEquals('foo bar', $node->text()); } public function testGetTag() { $node = new TextNode('foo bar'); $this->assertEquals('text', $node->getTag()->name()); } public function testAncestorByTag() { $node = new TextNode('foo bar'); $text = $node->ancestorByTag('text'); $this->assertEquals($node, $text); } public function testPreserveEntity() { $node = new TextNode('i'); $text = $node->innerhtml; $this->assertEquals('i', $text); } } PK!  Node.phpnuIw * * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js) * - (c) John MacFarlane * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\CommonMark\Node; abstract class Node { /** * @var int */ protected $depth = 0; /** * @var Node|null */ protected $parent; /** * @var Node|null */ protected $previous; /** * @var Node|null */ protected $next; /** * @var Node|null */ protected $firstChild; /** * @var Node|null */ protected $lastChild; /** * @return Node|null */ public function previous(): ?Node { return $this->previous; } /** * @return Node|null */ public function next(): ?Node { return $this->next; } /** * @return Node|null */ public function parent(): ?Node { return $this->parent; } /** * @param Node|null $node */ protected function setParent(Node $node = null) { $this->parent = $node; $this->depth = ($node === null) ? 0 : $node->depth + 1; } /** * Inserts the $sibling node after $this * * @param Node $sibling */ public function insertAfter(Node $sibling) { $sibling->detach(); $sibling->next = $this->next; if ($sibling->next) { $sibling->next->previous = $sibling; } $sibling->previous = $this; $this->next = $sibling; $sibling->setParent($this->parent); if (!$sibling->next && $sibling->parent) { $sibling->parent->lastChild = $sibling; } } /** * Inserts the $sibling node before $this * * @param Node $sibling */ public function insertBefore(Node $sibling) { $sibling->detach(); $sibling->previous = $this->previous; if ($sibling->previous) { $sibling->previous->next = $sibling; } $sibling->next = $this; $this->previous = $sibling; $sibling->setParent($this->parent); if (!$sibling->previous && $sibling->parent) { $sibling->parent->firstChild = $sibling; } } public function replaceWith(Node $replacement) { $replacement->detach(); $this->insertAfter($replacement); $this->detach(); } public function detach() { if ($this->previous) { $this->previous->next = $this->next; } elseif ($this->parent) { $this->parent->firstChild = $this->next; } if ($this->next) { $this->next->previous = $this->previous; } elseif ($this->parent) { $this->parent->lastChild = $this->previous; } $this->parent = null; $this->next = null; $this->previous = null; $this->depth = 0; } /** * @return bool */ abstract public function isContainer(): bool; /** * @return Node|null */ public function firstChild(): ?Node { return $this->firstChild; } /** * @return Node|null */ public function lastChild(): ?Node { return $this->lastChild; } /** * @return Node[] */ public function children(): iterable { $children = []; for ($current = $this->firstChild; null !== $current; $current = $current->next) { $children[] = $current; } return $children; } /** * @param Node $child */ public function appendChild(Node $child) { if ($this->lastChild) { $this->lastChild->insertAfter($child); } else { $child->detach(); $child->setParent($this); $this->lastChild = $this->firstChild = $child; } } /** * Adds $child as the very first child of $this * * @param Node $child */ public function prependChild(Node $child) { if ($this->firstChild) { $this->firstChild->insertBefore($child); } else { $child->detach(); $child->setParent($this); $this->lastChild = $this->firstChild = $child; } } /** * Detaches all child nodes of given node */ public function detachChildren() { foreach ($this->children() as $children) { $children->setParent(null); } $this->firstChild = $this->lastChild = null; } /** * Replace all children of given node with collection of another * * @param iterable $children * * @return $this */ public function replaceChildren(iterable $children) { $this->detachChildren(); foreach ($children as $item) { $this->appendChild($item); } return $this; } /** * @return int */ public function getDepth(): int { return $this->depth; } /** * @return NodeWalker */ public function walker(): NodeWalker { return new NodeWalker($this); } } PK!u*,NodeWalkerEvent.phpnuIw * * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js) * - (c) John MacFarlane * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\CommonMark\Node; final class NodeWalkerEvent { /** * @var Node */ private $node; /** * @var bool */ private $isEntering; /** * @param Node $node * @param bool $isEntering */ public function __construct(Node $node, $isEntering = true) { $this->node = $node; $this->isEntering = $isEntering; } /** * @return Node */ public function getNode(): Node { return $this->node; } /** * @return bool */ public function isEntering(): bool { return $this->isEntering; } } PK!{zzNodeWalker.phpnuIw * * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js) * - (c) John MacFarlane * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace League\CommonMark\Node; final class NodeWalker { /** * @var Node */ private $root; /** * @var Node|null */ private $current; /** * @var bool */ private $entering; /** * @param Node $root */ public function __construct(Node $root) { $this->root = $root; $this->current = $this->root; $this->entering = true; } /** * Returns an event which contains node and entering flag * (entering is true when we enter a Node from a parent or sibling, * and false when we reenter it from child) * * @return NodeWalkerEvent|null */ public function next(): ?NodeWalkerEvent { $current = $this->current; $entering = $this->entering; if (null === $current) { return null; } if ($entering && $current->isContainer()) { if ($current->firstChild()) { $this->current = $current->firstChild(); $this->entering = true; } else { $this->entering = false; } } elseif ($current === $this->root) { $this->current = null; } elseif (null === $current->next()) { $this->current = $current->parent(); $this->entering = false; } else { $this->current = $current->next(); $this->entering = true; } return new NodeWalkerEvent($current, $entering); } /** * Resets the iterator to resume at the specified node * * @param Node $node * @param bool $entering */ public function resumeAt(Node $node, bool $entering = true) { $this->current = $node; $this->entering = $entering; } } PK!JWVarLikeIdentifier.phpnu[ $attributes Additional attributes */ public function __construct($name, Expr $value, array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->value = $value; } public function getSubNodeNames(): array { return ['name', 'value']; } public function getType(): string { return 'Const'; } } PK!Ii NullableType.phpnu[ $attributes Additional attributes */ public function __construct(Node $type, array $attributes = []) { $this->attributes = $attributes; $this->type = $type; } public function getSubNodeNames(): array { return ['type']; } public function getType(): string { return 'NullableType'; } } PK!kQKbb Scalar.phpnu[ $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { $this->attributes = $attributes; $this->types = $types; } public function getSubNodeNames(): array { return ['types']; } public function getType(): string { return 'UnionType'; } } PK!'+Arg.phpnu[ $attributes Additional attributes * @param Identifier|null $name Parameter name (for named parameters) */ public function __construct( Expr $value, bool $byRef = false, bool $unpack = false, array $attributes = [], ?Identifier $name = null ) { $this->attributes = $attributes; $this->name = $name; $this->value = $value; $this->byRef = $byRef; $this->unpack = $unpack; } public function getSubNodeNames(): array { return ['name', 'value', 'byRef', 'unpack']; } public function getType(): string { return 'Arg'; } } PK!<#EEIdentifier.phpnu[ */ private static array $specialClassNames = [ 'self' => true, 'parent' => true, 'static' => true, ]; /** * Constructs an identifier node. * * @param string $name Identifier as string * @param array $attributes Additional attributes */ public function __construct(string $name, array $attributes = []) { if ($name === '') { throw new \InvalidArgumentException('Identifier name cannot be empty'); } $this->attributes = $attributes; $this->name = $name; } public function getSubNodeNames(): array { return ['name']; } /** * Get identifier as string. * * @psalm-return non-empty-string * @return string Identifier as string. */ public function toString(): string { return $this->name; } /** * Get lowercased identifier as string. * * @psalm-return non-empty-string&lowercase-string * @return string Lowercased identifier as string */ public function toLowerString(): string { return strtolower($this->name); } /** * Checks whether the identifier is a special class name (self, parent or static). * * @return bool Whether identifier is a special class name */ public function isSpecialClassName(): bool { return isset(self::$specialClassNames[strtolower($this->name)]); } /** * Get identifier as string. * * @psalm-return non-empty-string * @return string Identifier as string */ public function __toString(): string { return $this->name; } public function getType(): string { return 'Identifier'; } } PK!*/FunctionLike.phpnu[ Escaped character to its decoded value */ protected static array $replacements = [ '\\' => '\\', '$' => '$', 'n' => "\n", 'r' => "\r", 't' => "\t", 'f' => "\f", 'v' => "\v", 'e' => "\x1B", ]; /** * Constructs a string scalar node. * * @param string $value Value of the string * @param array $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } public function getSubNodeNames(): array { return ['value']; } /** * @param array $attributes * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes */ public static function fromString(string $str, array $attributes = [], bool $parseUnicodeEscape = true): self { $attributes['kind'] = ($str[0] === "'" || ($str[1] === "'" && ($str[0] === 'b' || $str[0] === 'B'))) ? Scalar\String_::KIND_SINGLE_QUOTED : Scalar\String_::KIND_DOUBLE_QUOTED; $attributes['rawValue'] = $str; $string = self::parse($str, $parseUnicodeEscape); return new self($string, $attributes); } /** * @internal * * Parses a string token. * * @param string $str String token content * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes * * @return string The parsed string */ public static function parse(string $str, bool $parseUnicodeEscape = true): string { $bLength = 0; if ('b' === $str[0] || 'B' === $str[0]) { $bLength = 1; } if ('\'' === $str[$bLength]) { return str_replace( ['\\\\', '\\\''], ['\\', '\''], substr($str, $bLength + 1, -1) ); } else { return self::parseEscapeSequences( substr($str, $bLength + 1, -1), '"', $parseUnicodeEscape ); } } /** * @internal * * Parses escape sequences in strings (all string types apart from single quoted). * * @param string $str String without quotes * @param null|string $quote Quote type * @param bool $parseUnicodeEscape Whether to parse PHP 7 \u escapes * * @return string String with escape sequences parsed */ public static function parseEscapeSequences(string $str, ?string $quote, bool $parseUnicodeEscape = true): string { if (null !== $quote) { $str = str_replace('\\' . $quote, $quote, $str); } $extra = ''; if ($parseUnicodeEscape) { $extra = '|u\{([0-9a-fA-F]+)\}'; } return preg_replace_callback( '~\\\\([\\\\$nrtfve]|[xX][0-9a-fA-F]{1,2}|[0-7]{1,3}' . $extra . ')~', function ($matches) { $str = $matches[1]; if (isset(self::$replacements[$str])) { return self::$replacements[$str]; } if ('x' === $str[0] || 'X' === $str[0]) { return chr(hexdec(substr($str, 1))); } if ('u' === $str[0]) { $dec = hexdec($matches[2]); // If it overflowed to float, treat as INT_MAX, it will throw an error anyway. return self::codePointToUtf8(\is_int($dec) ? $dec : \PHP_INT_MAX); } else { return chr(octdec($str) & 255); } }, $str ); } /** * Converts a Unicode code point to its UTF-8 encoded representation. * * @param int $num Code point * * @return string UTF-8 representation of code point */ private static function codePointToUtf8(int $num): string { if ($num <= 0x7F) { return chr($num); } if ($num <= 0x7FF) { return chr(($num >> 6) + 0xC0) . chr(($num & 0x3F) + 0x80); } if ($num <= 0xFFFF) { return chr(($num >> 12) + 0xE0) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); } if ($num <= 0x1FFFFF) { return chr(($num >> 18) + 0xF0) . chr((($num >> 12) & 0x3F) + 0x80) . chr((($num >> 6) & 0x3F) + 0x80) . chr(($num & 0x3F) + 0x80); } throw new Error('Invalid UTF-8 codepoint escape sequence: Codepoint too large'); } public function getType(): string { return 'Scalar_String'; } } PK!w^Scalar/EncapsedStringPart.phpnu[ $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; } public function getSubNodeNames(): array { return []; } /** * Get name of magic constant. * * @return string Name of magic constant */ abstract public function getName(): string; } PK!]AAScalar/Encapsed.phpnu[toString(); } public function getType(): string { return 'Name_FullyQualified'; } } PK!lNName/Relative.phpnu[toString(); } public function getType(): string { return 'Name_Relative'; } } PK!}序Expr.phpnu[ $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } public function getSubNodeNames(): array { return ['vars']; } public function getType(): string { return 'Stmt_Static'; } } PK!fu=Stmt/Const_.phpnu[ $attributes Additional attributes * @param list $attrGroups PHP attribute groups */ public function __construct( array $consts, array $attributes = [], array $attrGroups = [] ) { $this->attributes = $attributes; $this->attrGroups = $attrGroups; $this->consts = $consts; } public function getSubNodeNames(): array { return ['attrGroups', 'consts']; } public function getType(): string { return 'Stmt_Const'; } } PK!b b Stmt/Property.phpnu[ $attributes Additional attributes * @param null|Identifier|Name|ComplexType $type Type declaration * @param Node\AttributeGroup[] $attrGroups PHP attribute groups * @param Node\PropertyHook[] $hooks Property hooks */ public function __construct(int $flags, array $props, array $attributes = [], ?Node $type = null, array $attrGroups = [], array $hooks = []) { $this->attributes = $attributes; $this->flags = $flags; $this->props = $props; $this->type = $type; $this->attrGroups = $attrGroups; $this->hooks = $hooks; } public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'props', 'hooks']; } /** * Whether the property is explicitly or implicitly public. */ public function isPublic(): bool { return ($this->flags & Modifiers::PUBLIC) !== 0 || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** * Whether the property is protected. */ public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); } /** * Whether the property is private. */ public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); } /** * Whether the property is static. */ public function isStatic(): bool { return (bool) ($this->flags & Modifiers::STATIC); } /** * Whether the property is readonly. */ public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); } /** * Whether the property is abstract. */ public function isAbstract(): bool { return (bool) ($this->flags & Modifiers::ABSTRACT); } /** * Whether the property is final. */ public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); } /** * Whether the property has explicit public(set) visibility. */ public function isPublicSet(): bool { return (bool) ($this->flags & Modifiers::PUBLIC_SET); } /** * Whether the property has explicit protected(set) visibility. */ public function isProtectedSet(): bool { return (bool) ($this->flags & Modifiers::PROTECTED_SET); } /** * Whether the property has explicit private(set) visibility. */ public function isPrivateSet(): bool { return (bool) ($this->flags & Modifiers::PRIVATE_SET); } public function getType(): string { return 'Stmt_Property'; } } PK!kjStmt/Expression.phpnu[ $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Stmt_Expression'; } } PK!MMStmt/DeclareDeclare.phpnu[ $attributes Additional attributes */ public function __construct(array $uses, int $type = self::TYPE_NORMAL, array $attributes = []) { $this->attributes = $attributes; $this->type = $type; $this->uses = $uses; } public function getSubNodeNames(): array { return ['type', 'uses']; } public function getType(): string { return 'Stmt_Use'; } } PK!qStmt/Return_.phpnu[ $attributes Additional attributes */ public function __construct(?Node\Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Stmt_Return'; } } PK!;6} Stmt/For_.phpnu[ array(): Init expressions * 'cond' => array(): Loop conditions * 'loop' => array(): Loop expressions * 'stmts' => array(): Statements * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->init = $subNodes['init'] ?? []; $this->cond = $subNodes['cond'] ?? []; $this->loop = $subNodes['loop'] ?? []; $this->stmts = $subNodes['stmts'] ?? []; } public function getSubNodeNames(): array { return ['init', 'cond', 'loop', 'stmts']; } public function getType(): string { return 'Stmt_For'; } } PK!)M)--Stmt/Interface_.phpnu[ array(): Name of extended interfaces * 'stmts' => array(): Statements * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->extends = $subNodes['extends'] ?? []; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } public function getSubNodeNames(): array { return ['attrGroups', 'name', 'extends', 'stmts']; } public function getType(): string { return 'Stmt_Interface'; } } PK!r::Stmt/ElseIf_.phpnu[ $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } public function getSubNodeNames(): array { return ['cond', 'stmts']; } public function getType(): string { return 'Stmt_ElseIf'; } } PK!ZceeStmt/Case_.phpnu[ $attributes Additional attributes */ public function __construct(?Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } public function getSubNodeNames(): array { return ['cond', 'stmts']; } public function getType(): string { return 'Stmt_Case'; } } PK!oJStmt/Goto_.phpnu[ $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; } public function getSubNodeNames(): array { return ['name']; } public function getType(): string { return 'Stmt_Goto'; } } PK!'' Stmt/Nop.phpnu[ $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; } public function getSubNodeNames(): array { return ['stmts']; } public function getType(): string { return 'Stmt_Else'; } } PK! 5Stmt/HaltCompiler.phpnu[ $attributes Additional attributes */ public function __construct(string $remaining, array $attributes = []) { $this->attributes = $attributes; $this->remaining = $remaining; } public function getSubNodeNames(): array { return ['remaining']; } public function getType(): string { return 'Stmt_HaltCompiler'; } } PK!)%%Stmt/TraitUseAdaptation.phpnu[ $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; } public function getSubNodeNames(): array { return ['name']; } public function getType(): string { return 'Stmt_Label'; } } PK!_^WStmt/Unset_.phpnu[ $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } public function getSubNodeNames(): array { return ['vars']; } public function getType(): string { return 'Stmt_Unset'; } } PK!9t33 Stmt/Do_.phpnu[ $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } public function getSubNodeNames(): array { return ['stmts', 'cond']; } public function getType(): string { return 'Stmt_Do'; } } PK!}]ZZStmt/Catch_.phpnu[ $attributes Additional attributes */ public function __construct( array $types, ?Expr\Variable $var = null, array $stmts = [], array $attributes = [] ) { $this->attributes = $attributes; $this->types = $types; $this->var = $var; $this->stmts = $stmts; } public function getSubNodeNames(): array { return ['types', 'var', 'stmts']; } public function getType(): string { return 'Stmt_Catch'; } } PK!UޜTTStmt/ClassConst.phpnu[ $attributes Additional attributes * @param list $attrGroups PHP attribute groups * @param null|Node\Identifier|Node\Name|Node\ComplexType $type Type declaration */ public function __construct( array $consts, int $flags = 0, array $attributes = [], array $attrGroups = [], ?Node $type = null ) { $this->attributes = $attributes; $this->flags = $flags; $this->consts = $consts; $this->attrGroups = $attrGroups; $this->type = $type; } public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'consts']; } /** * Whether constant is explicitly or implicitly public. */ public function isPublic(): bool { return ($this->flags & Modifiers::PUBLIC) !== 0 || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** * Whether constant is protected. */ public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); } /** * Whether constant is private. */ public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); } /** * Whether constant is final. */ public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); } public function getType(): string { return 'Stmt_ClassConst'; } } PK!ݯMStmt/TryCatch.phpnu[ $attributes Additional attributes */ public function __construct(array $stmts, array $catches, ?Finally_ $finally = null, array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; $this->catches = $catches; $this->finally = $finally; } public function getSubNodeNames(): array { return ['stmts', 'catches', 'finally']; } public function getType(): string { return 'Stmt_TryCatch'; } } PK!|//Stmt/Trait_.phpnu[ array(): Statements * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } public function getSubNodeNames(): array { return ['attrGroups', 'name', 'stmts']; } public function getType(): string { return 'Stmt_Trait'; } } PK! oStmt/InlineHTML.phpnu[ $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } public function getSubNodeNames(): array { return ['value']; } public function getType(): string { return 'Stmt_InlineHTML'; } } PK!gMStmt/Declare_.phpnu[ $attributes Additional attributes */ public function __construct(array $declares, ?array $stmts = null, array $attributes = []) { $this->attributes = $attributes; $this->declares = $declares; $this->stmts = $stmts; } public function getSubNodeNames(): array { return ['declares', 'stmts']; } public function getType(): string { return 'Stmt_Declare'; } } PK!XStmt/Global_.phpnu[ $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } public function getSubNodeNames(): array { return ['vars']; } public function getType(): string { return 'Stmt_Global'; } } PK!< Stmt/ClassLike.phpnu[ */ public function getTraitUses(): array { $traitUses = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof TraitUse) { $traitUses[] = $stmt; } } return $traitUses; } /** * @return list */ public function getConstants(): array { $constants = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassConst) { $constants[] = $stmt; } } return $constants; } /** * @return list */ public function getProperties(): array { $properties = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { $properties[] = $stmt; } } return $properties; } /** * Gets property with the given name defined directly in this class/interface/trait. * * @param string $name Name of the property * * @return Property|null Property node or null if the property does not exist */ public function getProperty(string $name): ?Property { foreach ($this->stmts as $stmt) { if ($stmt instanceof Property) { foreach ($stmt->props as $prop) { if ($prop instanceof PropertyItem && $name === $prop->name->toString()) { return $stmt; } } } } return null; } /** * Gets all methods defined directly in this class/interface/trait * * @return list */ public function getMethods(): array { $methods = []; foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod) { $methods[] = $stmt; } } return $methods; } /** * Gets method with the given name defined directly in this class/interface/trait. * * @param string $name Name of the method (compared case-insensitively) * * @return ClassMethod|null Method node or null if the method does not exist */ public function getMethod(string $name): ?ClassMethod { $lowerName = strtolower($name); foreach ($this->stmts as $stmt) { if ($stmt instanceof ClassMethod && $lowerName === $stmt->name->toLowerString()) { return $stmt; } } return null; } } PK! >66Stmt/While_.phpnu[ $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $stmts; } public function getSubNodeNames(): array { return ['cond', 'stmts']; } public function getType(): string { return 'Stmt_While'; } } PK!F..Stmt/Throw_.phpnu[attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames() : array { return ['expr']; } public function getType() : string { return 'Stmt_Throw'; } } PK!llStmt/ClassMethod.phpnu[ */ private static array $magicNames = [ '__construct' => true, '__destruct' => true, '__call' => true, '__callstatic' => true, '__get' => true, '__set' => true, '__isset' => true, '__unset' => true, '__sleep' => true, '__wakeup' => true, '__tostring' => true, '__set_state' => true, '__clone' => true, '__invoke' => true, '__debuginfo' => true, '__serialize' => true, '__unserialize' => true, ]; /** * Constructs a class method node. * * @param string|Node\Identifier $name Name * @param array{ * flags?: int, * byRef?: bool, * params?: Node\Param[], * returnType?: null|Node\Identifier|Node\Name|Node\ComplexType, * stmts?: Node\Stmt[]|null, * attrGroups?: Node\AttributeGroup[], * } $subNodes Array of the following optional subnodes: * 'flags => 0 : Flags * 'byRef' => false : Whether to return by reference * 'params' => array() : Parameters * 'returnType' => null : Return type * 'stmts' => array() : Statements * 'attrGroups' => array() : PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = array_key_exists('stmts', $subNodes) ? $subNodes['stmts'] : []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'returnType', 'stmts']; } public function returnsByRef(): bool { return $this->byRef; } public function getParams(): array { return $this->params; } public function getReturnType() { return $this->returnType; } public function getStmts(): ?array { return $this->stmts; } public function getAttrGroups(): array { return $this->attrGroups; } /** * Whether the method is explicitly or implicitly public. */ public function isPublic(): bool { return ($this->flags & Modifiers::PUBLIC) !== 0 || ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } /** * Whether the method is protected. */ public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); } /** * Whether the method is private. */ public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); } /** * Whether the method is abstract. */ public function isAbstract(): bool { return (bool) ($this->flags & Modifiers::ABSTRACT); } /** * Whether the method is final. */ public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); } /** * Whether the method is static. */ public function isStatic(): bool { return (bool) ($this->flags & Modifiers::STATIC); } /** * Whether the method is magic. */ public function isMagic(): bool { return isset(self::$magicNames[$this->name->toLowerString()]); } public function getType(): string { return 'Stmt_ClassMethod'; } } PK!WStmt/Foreach_.phpnu[ null : Variable to assign key to * 'byRef' => false : Whether to assign value by reference * 'stmts' => array(): Statements * @param array $attributes Additional attributes */ public function __construct(Node\Expr $expr, Node\Expr $valueVar, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; $this->keyVar = $subNodes['keyVar'] ?? null; $this->byRef = $subNodes['byRef'] ?? false; $this->valueVar = $valueVar; $this->stmts = $subNodes['stmts'] ?? []; } public function getSubNodeNames(): array { return ['expr', 'keyVar', 'byRef', 'valueVar', 'stmts']; } public function getType(): string { return 'Stmt_Foreach'; } } PK!355Stmt/UseUse.phpnu[ array(): Statements * 'elseifs' => array(): Elseif clauses * 'else' => null : Else clause * @param array $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->stmts = $subNodes['stmts'] ?? []; $this->elseifs = $subNodes['elseifs'] ?? []; $this->else = $subNodes['else'] ?? null; } public function getSubNodeNames(): array { return ['cond', 'stmts', 'elseifs', 'else']; } public function getType(): string { return 'Stmt_If'; } } PK!DAStmt/Continue_.phpnu[ $attributes Additional attributes */ public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; $this->num = $num; } public function getSubNodeNames(): array { return ['num']; } public function getType(): string { return 'Stmt_Continue'; } } PK!_|4911Stmt/StaticVar.phpnu[ $attributes Additional attributes */ public function __construct(array $exprs, array $attributes = []) { $this->attributes = $attributes; $this->exprs = $exprs; } public function getSubNodeNames(): array { return ['exprs']; } public function getType(): string { return 'Stmt_Echo'; } } PK!_a((Stmt/Switch_.phpnu[ $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $cases, array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->cases = $cases; } public function getSubNodeNames(): array { return ['cond', 'cases']; } public function getType(): string { return 'Stmt_Switch'; } } PK!"ESSStmt/PropertyProperty.phpnu[AStmt/Break_.phpnu[ $attributes Additional attributes */ public function __construct(?Node\Expr $num = null, array $attributes = []) { $this->attributes = $attributes; $this->num = $num; } public function getSubNodeNames(): array { return ['num']; } public function getType(): string { return 'Stmt_Break'; } } PK!]TS!Stmt/TraitUseAdaptation/Alias.phpnu[ $attributes Additional attributes */ public function __construct(?Node\Name $trait, $method, ?int $newModifier, $newName, array $attributes = []) { $this->attributes = $attributes; $this->trait = $trait; $this->method = \is_string($method) ? new Node\Identifier($method) : $method; $this->newModifier = $newModifier; $this->newName = \is_string($newName) ? new Node\Identifier($newName) : $newName; } public function getSubNodeNames(): array { return ['trait', 'method', 'newModifier', 'newName']; } public function getType(): string { return 'Stmt_TraitUseAdaptation_Alias'; } } PK!!Ұ&Stmt/TraitUseAdaptation/Precedence.phpnu[ $attributes Additional attributes */ public function __construct(Node\Name $trait, $method, array $insteadof, array $attributes = []) { $this->attributes = $attributes; $this->trait = $trait; $this->method = \is_string($method) ? new Node\Identifier($method) : $method; $this->insteadof = $insteadof; } public function getSubNodeNames(): array { return ['trait', 'method', 'insteadof']; } public function getType(): string { return 'Stmt_TraitUseAdaptation_Precedence'; } } PK!&XyyStmt/TraitUse.phpnu[ $attributes Additional attributes */ public function __construct(array $traits, array $adaptations = [], array $attributes = []) { $this->attributes = $attributes; $this->traits = $traits; $this->adaptations = $adaptations; } public function getSubNodeNames(): array { return ['traits', 'adaptations']; } public function getType(): string { return 'Stmt_TraitUse'; } } PK!wStmt/Finally_.phpnu[ $attributes Additional attributes */ public function __construct(array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; } public function getSubNodeNames(): array { return ['stmts']; } public function getType(): string { return 'Stmt_Finally'; } } PK!q*"Stmt/Namespace_.phpnu[ $attributes Additional attributes */ public function __construct(?Node\Name $name = null, ?array $stmts = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->stmts = $stmts; } public function getSubNodeNames(): array { return ['name', 'stmts']; } public function getType(): string { return 'Stmt_Namespace'; } } PK!\ Stmt/Class_.phpnu[ 0 : Flags * 'extends' => null : Name of extended class * 'implements' => array(): Names of implemented interfaces * 'stmts' => array(): Statements * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->flags = $subNodes['flags'] ?? $subNodes['type'] ?? 0; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->extends = $subNodes['extends'] ?? null; $this->implements = $subNodes['implements'] ?? []; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'name', 'extends', 'implements', 'stmts']; } /** * Whether the class is explicitly abstract. */ public function isAbstract(): bool { return (bool) ($this->flags & Modifiers::ABSTRACT); } /** * Whether the class is final. */ public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); } public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); } /** * Whether the class is anonymous. */ public function isAnonymous(): bool { return null === $this->name; } public function getType(): string { return 'Stmt_Class'; } } PK!$|%%Stmt/GroupUse.phpnu[ $attributes Additional attributes */ public function __construct(Name $prefix, array $uses, int $type = Use_::TYPE_NORMAL, array $attributes = []) { $this->attributes = $attributes; $this->type = $type; $this->prefix = $prefix; $this->uses = $uses; } public function getSubNodeNames(): array { return ['type', 'prefix', 'uses']; } public function getType(): string { return 'Stmt_GroupUse'; } } PK!Qp p Stmt/Function_.phpnu[ false : Whether to return by reference * 'params' => array(): Parameters * 'returnType' => null : Return type * 'stmts' => array(): Statements * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->byRef = $subNodes['byRef'] ?? false; $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->params = $subNodes['params'] ?? []; $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } public function getSubNodeNames(): array { return ['attrGroups', 'byRef', 'name', 'params', 'returnType', 'stmts']; } public function returnsByRef(): bool { return $this->byRef; } public function getParams(): array { return $this->params; } public function getReturnType() { return $this->returnType; } public function getAttrGroups(): array { return $this->attrGroups; } /** @return Node\Stmt[] */ public function getStmts(): array { return $this->stmts; } public function getType(): string { return 'Stmt_Function'; } } PK!b!!Name.phpnu[ */ private static array $specialClassNames = [ 'self' => true, 'parent' => true, 'static' => true, ]; /** * Constructs a name node. * * @param string|string[]|self $name Name as string, part array or Name instance (copy ctor) * @param array $attributes Additional attributes */ final public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = self::prepareName($name); } public function getSubNodeNames(): array { return ['name']; } /** * Get parts of name (split by the namespace separator). * * @psalm-return non-empty-list * @return string[] Parts of name */ public function getParts(): array { return \explode('\\', $this->name); } /** * Gets the first part of the name, i.e. everything before the first namespace separator. * * @return string First part of the name */ public function getFirst(): string { if (false !== $pos = \strpos($this->name, '\\')) { return \substr($this->name, 0, $pos); } return $this->name; } /** * Gets the last part of the name, i.e. everything after the last namespace separator. * * @return string Last part of the name */ public function getLast(): string { if (false !== $pos = \strrpos($this->name, '\\')) { return \substr($this->name, $pos + 1); } return $this->name; } /** * Checks whether the name is unqualified. (E.g. Name) * * @return bool Whether the name is unqualified */ public function isUnqualified(): bool { return false === \strpos($this->name, '\\'); } /** * Checks whether the name is qualified. (E.g. Name\Name) * * @return bool Whether the name is qualified */ public function isQualified(): bool { return false !== \strpos($this->name, '\\'); } /** * Checks whether the name is fully qualified. (E.g. \Name) * * @return bool Whether the name is fully qualified */ public function isFullyQualified(): bool { return false; } /** * Checks whether the name is explicitly relative to the current namespace. (E.g. namespace\Name) * * @return bool Whether the name is relative */ public function isRelative(): bool { return false; } /** * Returns a string representation of the name itself, without taking the name type into * account (e.g., not including a leading backslash for fully qualified names). * * @psalm-return non-empty-string * @return string String representation */ public function toString(): string { return $this->name; } /** * Returns a string representation of the name as it would occur in code (e.g., including * leading backslash for fully qualified names. * * @psalm-return non-empty-string * @return string String representation */ public function toCodeString(): string { return $this->toString(); } /** * Returns lowercased string representation of the name, without taking the name type into * account (e.g., no leading backslash for fully qualified names). * * @psalm-return non-empty-string&lowercase-string * @return string Lowercased string representation */ public function toLowerString(): string { return strtolower($this->name); } /** * Checks whether the identifier is a special class name (self, parent or static). * * @return bool Whether identifier is a special class name */ public function isSpecialClassName(): bool { return isset(self::$specialClassNames[strtolower($this->name)]); } /** * Returns a string representation of the name by imploding the namespace parts with the * namespace separator. * * @psalm-return non-empty-string * @return string String representation */ public function __toString(): string { return $this->name; } /** * Gets a slice of a name (similar to array_slice). * * This method returns a new instance of the same type as the original and with the same * attributes. * * If the slice is empty, null is returned. The null value will be correctly handled in * concatenations using concat(). * * Offset and length have the same meaning as in array_slice(). * * @param int $offset Offset to start the slice at (may be negative) * @param int|null $length Length of the slice (may be negative) * * @return static|null Sliced name */ public function slice(int $offset, ?int $length = null) { if ($offset === 1 && $length === null) { // Short-circuit the common case. if (false !== $pos = \strpos($this->name, '\\')) { return new static(\substr($this->name, $pos + 1)); } return null; } $parts = \explode('\\', $this->name); $numParts = \count($parts); $realOffset = $offset < 0 ? $offset + $numParts : $offset; if ($realOffset < 0 || $realOffset > $numParts) { throw new \OutOfBoundsException(sprintf('Offset %d is out of bounds', $offset)); } if (null === $length) { $realLength = $numParts - $realOffset; } else { $realLength = $length < 0 ? $length + $numParts - $realOffset : $length; if ($realLength < 0 || $realLength > $numParts - $realOffset) { throw new \OutOfBoundsException(sprintf('Length %d is out of bounds', $length)); } } if ($realLength === 0) { // Empty slice is represented as null return null; } return new static(array_slice($parts, $realOffset, $realLength), $this->attributes); } /** * Concatenate two names, yielding a new Name instance. * * The type of the generated instance depends on which class this method is called on, for * example Name\FullyQualified::concat() will yield a Name\FullyQualified instance. * * If one of the arguments is null, a new instance of the other name will be returned. If both * arguments are null, null will be returned. As such, writing * Name::concat($namespace, $shortName) * where $namespace is a Name node or null will work as expected. * * @param string|string[]|self|null $name1 The first name * @param string|string[]|self|null $name2 The second name * @param array $attributes Attributes to assign to concatenated name * * @return static|null Concatenated name */ public static function concat($name1, $name2, array $attributes = []) { if (null === $name1 && null === $name2) { return null; } if (null === $name1) { return new static($name2, $attributes); } if (null === $name2) { return new static($name1, $attributes); } else { return new static( self::prepareName($name1) . '\\' . self::prepareName($name2), $attributes ); } } /** * Prepares a (string, array or Name node) name for use in name changing methods by converting * it to a string. * * @param string|string[]|self $name Name to prepare * * @psalm-return non-empty-string * @return string Prepared name */ private static function prepareName($name): string { if (\is_string($name)) { if ('' === $name) { throw new \InvalidArgumentException('Name cannot be empty'); } return $name; } if (\is_array($name)) { if (empty($name)) { throw new \InvalidArgumentException('Name cannot be empty'); } return implode('\\', $name); } if ($name instanceof self) { return $name->name; } throw new \InvalidArgumentException( 'Expected string, array of parts or Name instance' ); } public function getType(): string { return 'Name'; } } PK!u^ Param.phpnu[ $attributes Additional attributes * @param int $flags Optional visibility flags * @param list $attrGroups PHP attribute groups * @param PropertyHook[] $hooks Property hooks for promoted properties */ public function __construct( Expr $var, ?Expr $default = null, ?Node $type = null, bool $byRef = false, bool $variadic = false, array $attributes = [], int $flags = 0, array $attrGroups = [], array $hooks = [] ) { $this->attributes = $attributes; $this->type = $type; $this->byRef = $byRef; $this->variadic = $variadic; $this->var = $var; $this->default = $default; $this->flags = $flags; $this->attrGroups = $attrGroups; $this->hooks = $hooks; } public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'type', 'byRef', 'variadic', 'var', 'default', 'hooks']; } public function getType(): string { return 'Param'; } /** * Whether this parameter uses constructor property promotion. */ public function isPromoted(): bool { return $this->flags !== 0 || $this->hooks !== []; } public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); } public function isPublic(): bool { $public = (bool) ($this->flags & Modifiers::PUBLIC); if ($public) { return true; } if (!$this->isPromoted()) { return false; } return ($this->flags & Modifiers::VISIBILITY_MASK) === 0; } public function isProtected(): bool { return (bool) ($this->flags & Modifiers::PROTECTED); } public function isPrivate(): bool { return (bool) ($this->flags & Modifiers::PRIVATE); } public function isReadonly(): bool { return (bool) ($this->flags & Modifiers::READONLY); } /** * Whether the promoted property has explicit public(set) visibility. */ public function isPublicSet(): bool { return (bool) ($this->flags & Modifiers::PUBLIC_SET); } /** * Whether the promoted property has explicit protected(set) visibility. */ public function isProtectedSet(): bool { return (bool) ($this->flags & Modifiers::PROTECTED_SET); } /** * Whether the promoted property has explicit private(set) visibility. */ public function isPrivateSet(): bool { return (bool) ($this->flags & Modifiers::PRIVATE_SET); } } PK!_EExpr/PostDec.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } public function getSubNodeNames(): array { return ['var']; } public function getType(): string { return 'Expr_PostDec'; } } PK!A  Expr/Closure.phpnu[ false : Whether the closure is static * 'byRef' => false : Whether to return by reference * 'params' => array(): Parameters * 'uses' => array(): use()s * 'returnType' => null : Return type * 'stmts' => array(): Statements * 'attrGroups' => array(): PHP attributes groups * @param array $attributes Additional attributes */ public function __construct(array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->static = $subNodes['static'] ?? false; $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; $this->uses = $subNodes['uses'] ?? []; $this->returnType = $subNodes['returnType'] ?? null; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } public function getSubNodeNames(): array { return ['attrGroups', 'static', 'byRef', 'params', 'uses', 'returnType', 'stmts']; } public function returnsByRef(): bool { return $this->byRef; } public function getParams(): array { return $this->params; } public function getReturnType() { return $this->returnType; } /** @return Node\Stmt[] */ public function getStmts(): array { return $this->stmts; } public function getAttrGroups(): array { return $this->attrGroups; } public function getType(): string { return 'Expr_Closure'; } } PK!v||Expr/PreDec.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } public function getSubNodeNames(): array { return ['var']; } public function getType(): string { return 'Expr_PreDec'; } } PK!XMfExpr/StaticCall.phpnu[ Arguments */ public array $args; /** * Constructs a static method call node. * * @param Node\Name|Expr $class Class name * @param string|Identifier|Expr $name Method name * @param array $args Arguments * @param array $attributes Additional attributes */ public function __construct(Node $class, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; } public function getSubNodeNames(): array { return ['class', 'name', 'args']; } public function getType(): string { return 'Expr_StaticCall'; } public function getRawArgs(): array { return $this->args; } } PK!=hfExpr/Exit_.phpnu[ $attributes Additional attributes */ public function __construct(?Expr $expr = null, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_Exit'; } } PK!+6Expr/Include_.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, int $type, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; $this->type = $type; } public function getSubNodeNames(): array { return ['expr', 'type']; } public function getType(): string { return 'Expr_Include'; } } PK!)Expr/ShellExec.phpnu[ $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { $this->attributes = $attributes; $this->parts = $parts; } public function getSubNodeNames(): array { return ['parts']; } public function getType(): string { return 'Expr_ShellExec'; } } PK!D GGExpr/BinaryOp.phpnu[ $attributes Additional attributes */ public function __construct(Expr $left, Expr $right, array $attributes = []) { $this->attributes = $attributes; $this->left = $left; $this->right = $right; } public function getSubNodeNames(): array { return ['left', 'right']; } /** * Get the operator sigil for this binary operation. * * In the case there are multiple possible sigils for an operator, this method does not * necessarily return the one used in the parsed code. */ abstract public function getOperatorSigil(): string; } PK!PExpr/FuncCall.phpnu[ Arguments */ public array $args; /** * Constructs a function call node. * * @param Node\Name|Expr $name Function name * @param array $args Arguments * @param array $attributes Additional attributes */ public function __construct(Node $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->args = $args; } public function getSubNodeNames(): array { return ['name', 'args']; } public function getType(): string { return 'Expr_FuncCall'; } public function getRawArgs(): array { return $this->args; } } PK!Expr/YieldFrom.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_YieldFrom'; } } PK!?(Expr/Isset_.phpnu[ $attributes Additional attributes */ public function __construct(array $vars, array $attributes = []) { $this->attributes = $attributes; $this->vars = $vars; } public function getSubNodeNames(): array { return ['vars']; } public function getType(): string { return 'Expr_Isset'; } } PK!{%}}Expr/Eval_.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_Eval'; } } PK!X Expr/ArrowFunction.phpnu[ false : Whether the closure is static * 'byRef' => false : Whether to return by reference * 'params' => array() : Parameters * 'returnType' => null : Return type * 'attrGroups' => array() : PHP attribute groups * @param array $attributes Additional attributes */ public function __construct(array $subNodes, array $attributes = []) { $this->attributes = $attributes; $this->static = $subNodes['static'] ?? false; $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; $this->returnType = $subNodes['returnType'] ?? null; $this->expr = $subNodes['expr']; $this->attrGroups = $subNodes['attrGroups'] ?? []; } public function getSubNodeNames(): array { return ['attrGroups', 'static', 'byRef', 'params', 'returnType', 'expr']; } public function returnsByRef(): bool { return $this->byRef; } public function getParams(): array { return $this->params; } public function getReturnType() { return $this->returnType; } public function getAttrGroups(): array { return $this->attrGroups; } /** * @return Node\Stmt\Return_[] */ public function getStmts(): array { return [new Node\Stmt\Return_($this->expr)]; } public function getType(): string { return 'Expr_ArrowFunction'; } } PK!h??Expr/Array_.phpnu[ $attributes Additional attributes */ public function __construct(array $items = [], array $attributes = []) { $this->attributes = $attributes; $this->items = $items; } public function getSubNodeNames(): array { return ['items']; } public function getType(): string { return 'Expr_Array'; } } PK!&>Expr/UnaryPlus.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_UnaryPlus'; } } PK!ѫExpr/PostInc.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } public function getSubNodeNames(): array { return ['var']; } public function getType(): string { return 'Expr_PostInc'; } } PK!R?AExpr/AssignOp.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->expr = $expr; } public function getSubNodeNames(): array { return ['var', 'expr']; } } PK!.Expr/BitwiseNot.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_BitwiseNot'; } } PK!jUExpr/Error.phpnu[ $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; } public function getSubNodeNames(): array { return []; } public function getType(): string { return 'Expr_Error'; } } PK!{)\\Expr/Instanceof_.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, Node $class, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; $this->class = $class; } public function getSubNodeNames(): array { return ['expr', 'class']; } public function getType(): string { return 'Expr_Instanceof'; } } PK!4 ||Expr/PreInc.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; } public function getSubNodeNames(): array { return ['var']; } public function getType(): string { return 'Expr_PreInc'; } } PK!;Expr/PropertyFetch.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; } public function getSubNodeNames(): array { return ['var', 'name']; } public function getType(): string { return 'Expr_PropertyFetch'; } } PK!E//Expr/BinaryOp/Concat.phpnu[='; } public function getType(): string { return 'Expr_BinaryOp_GreaterOrEqual'; } } PK!-)66Expr/BinaryOp/ShiftLeft.phpnu[>'; } public function getType(): string { return 'Expr_BinaryOp_ShiftRight'; } } PK!+\))Expr/BinaryOp/Mul.phpnu['; } public function getType(): string { return 'Expr_BinaryOp_Greater'; } } PK!Os11Expr/BinaryOp/Smaller.phpnu[$--Expr/BinaryOp/Minus.phpnu['; } public function getType(): string { return 'Expr_BinaryOp_Spaceship'; } } PK!@**Expr/BinaryOp/Pow.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_Print'; } } PK!*Expr/Ternary.phpnu[ $attributes Additional attributes */ public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->if = $if; $this->else = $else; } public function getSubNodeNames(): array { return ['cond', 'if', 'else']; } public function getType(): string { return 'Expr_Ternary'; } } PK!155Expr/ClosureUse.phpnu[ $attributes Additional attributes */ public function __construct(array $items, array $attributes = []) { $this->attributes = $attributes; $this->items = $items; } public function getSubNodeNames(): array { return ['items']; } public function getType(): string { return 'Expr_List'; } } PK!RExpr/UnaryMinus.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_UnaryMinus'; } } PK!W0Expr/Assign.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->expr = $expr; } public function getSubNodeNames(): array { return ['var', 'expr']; } public function getType(): string { return 'Expr_Assign'; } } PK!&8r}}Expr/Variable.phpnu[ $attributes Additional attributes */ public function __construct($name, array $attributes = []) { $this->attributes = $attributes; $this->name = $name; } public function getSubNodeNames(): array { return ['name']; } public function getType(): string { return 'Expr_Variable'; } } PK!77Expr/AssignRef.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->expr = $expr; } public function getSubNodeNames(): array { return ['var', 'expr']; } public function getType(): string { return 'Expr_AssignRef'; } } PK!&IՌExpr/BooleanNot.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_BooleanNot'; } } PK!5]NNExpr/Yield_.phpnu[ $attributes Additional attributes */ public function __construct(?Expr $value = null, ?Expr $key = null, array $attributes = []) { $this->attributes = $attributes; $this->key = $key; $this->value = $value; } public function getSubNodeNames(): array { return ['key', 'value']; } public function getType(): string { return 'Expr_Yield'; } } PK!,Fj3Expr/MethodCall.phpnu[ Arguments */ public array $args; /** * Constructs a function call node. * * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Method name * @param array $args Arguments * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; } public function getSubNodeNames(): array { return ['var', 'name', 'args']; } public function getType(): string { return 'Expr_MethodCall'; } public function getRawArgs(): array { return $this->args; } } PK!N?UMM Expr/New_.phpnu[ Arguments */ public array $args; /** * Constructs a function call node. * * @param Node\Name|Expr|Node\Stmt\Class_ $class Class name (or class node for anonymous classes) * @param array $args Arguments * @param array $attributes Additional attributes */ public function __construct(Node $class, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->args = $args; } public function getSubNodeNames(): array { return ['class', 'args']; } public function getType(): string { return 'Expr_New'; } public function getRawArgs(): array { return $this->args; } } PK!,Expr/ConstFetch.phpnu[ $attributes Additional attributes */ public function __construct(Name $name, array $attributes = []) { $this->attributes = $attributes; $this->name = $name; } public function getSubNodeNames(): array { return ['name']; } public function getType(): string { return 'Expr_ConstFetch'; } } PK!i*Expr/Empty_.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_Empty'; } } PK![gExpr/Cast/Array_.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } } PK!nExpr/ErrorSuppress.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_ErrorSuppress'; } } PK!FExpr/StaticPropertyFetch.phpnu[ $attributes Additional attributes */ public function __construct(Node $class, $name, array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new VarLikeIdentifier($name) : $name; } public function getSubNodeNames(): array { return ['class', 'name']; } public function getType(): string { return 'Expr_StaticPropertyFetch'; } } PK! z}}Expr/Clone_.phpnu[ $attributes Additional attributes */ public function __construct(Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_Clone'; } } PK!N'&Expr/ClassConstFetch.phpnu[ $attributes Additional attributes */ public function __construct(Node $class, $name, array $attributes = []) { $this->attributes = $attributes; $this->class = $class; $this->name = \is_string($name) ? new Identifier($name) : $name; } public function getSubNodeNames(): array { return ['class', 'name']; } public function getType(): string { return 'Expr_ClassConstFetch'; } } PK!=R66Expr/ArrayDimFetch.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, ?Expr $dim = null, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->dim = $dim; } public function getSubNodeNames(): array { return ['var', 'dim']; } public function getType(): string { return 'Expr_ArrayDimFetch'; } } PK!NsQExpr/AssignOp/Concat.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a combined node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class CombinedSelectorNode extends AbstractNode { /** * @var NodeInterface */ private $selector; /** * @var string */ private $combinator; /** * @var NodeInterface */ private $subSelector; /** * @param NodeInterface $selector * @param string $combinator * @param NodeInterface $subSelector */ public function __construct(NodeInterface $selector, $combinator, NodeInterface $subSelector) { $this->selector = $selector; $this->combinator = $combinator; $this->subSelector = $subSelector; } /** * @return NodeInterface */ public function getSelector() { return $this->selector; } /** * @return string */ public function getCombinator() { return $this->combinator; } /** * @return NodeInterface */ public function getSubSelector() { return $this->subSelector; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->selector->getSpecificity()->plus($this->subSelector->getSpecificity()); } /** * {@inheritdoc} */ public function __toString() { $combinator = ' ' === $this->combinator ? '' : $this->combinator; return sprintf('%s[%s %s %s]', $this->getNodeName(), $this->selector, $combinator, $this->subSelector); } } PK!rINodeInterface.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Interface for nodes. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ interface NodeInterface { /** * Returns node's name. * * @return string */ public function getNodeName(); /** * Returns node's specificity. * * @return Specificity */ public function getSpecificity(); /** * Returns node's string representation. * * @return string */ public function __toString(); } PK!SelectorNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a "(::|:)" node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class SelectorNode extends AbstractNode { /** * @var NodeInterface */ private $tree; /** * @var null|string */ private $pseudoElement; /** * @param NodeInterface $tree * @param null|string $pseudoElement */ public function __construct(NodeInterface $tree, $pseudoElement = null) { $this->tree = $tree; $this->pseudoElement = $pseudoElement ? strtolower($pseudoElement) : null; } /** * @return NodeInterface */ public function getTree() { return $this->tree; } /** * @return null|string */ public function getPseudoElement() { return $this->pseudoElement; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->tree->getSpecificity()->plus(new Specificity(0, 0, $this->pseudoElement ? 1 : 0)); } /** * {@inheritdoc} */ public function __toString() { return sprintf('%s[%s%s]', $this->getNodeName(), $this->tree, $this->pseudoElement ? '::'.$this->pseudoElement : ''); } } PK!pM2AbstractNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Abstract base node class. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ abstract class AbstractNode implements NodeInterface { /** * @var string */ private $nodeName; /** * @return string */ public function getNodeName() { if (null === $this->nodeName) { $this->nodeName = preg_replace('~.*\\\\([^\\\\]+)Node$~', '$1', get_called_class()); } return $this->nodeName; } } PK!Г^FFElementNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a "|" node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class ElementNode extends AbstractNode { /** * @var string|null */ private $namespace; /** * @var string|null */ private $element; /** * @param string|null $namespace * @param string|null $element */ public function __construct($namespace = null, $element = null) { $this->namespace = $namespace; $this->element = $element; } /** * @return null|string */ public function getNamespace() { return $this->namespace; } /** * @return null|string */ public function getElement() { return $this->element; } /** * {@inheritdoc} */ public function getSpecificity() { return new Specificity(0, 0, $this->element ? 1 : 0); } /** * {@inheritdoc} */ public function __toString() { $element = $this->element ?: '*'; return sprintf('%s[%s]', $this->getNodeName(), $this->namespace ? $this->namespace.'|'.$element : $element); } } PK!.22PseudoNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a ":" node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class PseudoNode extends AbstractNode { /** * @var NodeInterface */ private $selector; /** * @var string */ private $identifier; /** * @param NodeInterface $selector * @param string $identifier */ public function __construct(NodeInterface $selector, $identifier) { $this->selector = $selector; $this->identifier = strtolower($identifier); } /** * @return NodeInterface */ public function getSelector() { return $this->selector; } /** * @return string */ public function getIdentifier() { return $this->identifier; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); } /** * {@inheritdoc} */ public function __toString() { return sprintf('%s[%s:%s]', $this->getNodeName(), $this->selector, $this->identifier); } } PK! i ClassNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a "." node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class ClassNode extends AbstractNode { /** * @var NodeInterface */ private $selector; /** * @var string */ private $name; /** * @param NodeInterface $selector * @param string $name */ public function __construct(NodeInterface $selector, $name) { $this->selector = $selector; $this->name = $name; } /** * @return NodeInterface */ public function getSelector() { return $this->selector; } /** * @return string */ public function getName() { return $this->name; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); } /** * {@inheritdoc} */ public function __toString() { return sprintf('%s[%s.%s]', $this->getNodeName(), $this->selector, $this->name); } } PK!bbNegationNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a ":not()" node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class NegationNode extends AbstractNode { /** * @var NodeInterface */ private $selector; /** * @var NodeInterface */ private $subSelector; /** * @param NodeInterface $selector * @param NodeInterface $subSelector */ public function __construct(NodeInterface $selector, NodeInterface $subSelector) { $this->selector = $selector; $this->subSelector = $subSelector; } /** * @return NodeInterface */ public function getSelector() { return $this->selector; } /** * @return NodeInterface */ public function getSubSelector() { return $this->subSelector; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->selector->getSpecificity()->plus($this->subSelector->getSpecificity()); } /** * {@inheritdoc} */ public function __toString() { return sprintf('%s[%s:not(%s)]', $this->getNodeName(), $this->selector, $this->subSelector); } } PK!xSpecificity.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a node specificity. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @see http://www.w3.org/TR/selectors/#specificity * * @author Jean-François Simon */ class Specificity { const A_FACTOR = 100; const B_FACTOR = 10; const C_FACTOR = 1; /** * @var int */ private $a; /** * @var int */ private $b; /** * @var int */ private $c; /** * Constructor. * * @param int $a * @param int $b * @param int $c */ public function __construct($a, $b, $c) { $this->a = $a; $this->b = $b; $this->c = $c; } /** * @param Specificity $specificity * * @return Specificity */ public function plus(Specificity $specificity) { return new self($this->a + $specificity->a, $this->b + $specificity->b, $this->c + $specificity->c); } /** * Returns global specificity value. * * @return int */ public function getValue() { return $this->a * self::A_FACTOR + $this->b * self::B_FACTOR + $this->c * self::C_FACTOR; } } PK!#^[ HashNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a "#" node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class HashNode extends AbstractNode { /** * @var NodeInterface */ private $selector; /** * @var string */ private $id; /** * @param NodeInterface $selector * @param string $id */ public function __construct(NodeInterface $selector, $id) { $this->selector = $selector; $this->id = $id; } /** * @return NodeInterface */ public function getSelector() { return $this->selector; } /** * @return string */ public function getId() { return $this->id; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->selector->getSpecificity()->plus(new Specificity(1, 0, 0)); } /** * {@inheritdoc} */ public function __toString() { return sprintf('%s[%s#%s]', $this->getNodeName(), $this->selector, $this->id); } } PK!FK K AttributeNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; /** * Represents a "[| ]" node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class AttributeNode extends AbstractNode { /** * @var NodeInterface */ private $selector; /** * @var string */ private $namespace; /** * @var string */ private $attribute; /** * @var string */ private $operator; /** * @var string */ private $value; /** * @param NodeInterface $selector * @param string $namespace * @param string $attribute * @param string $operator * @param string $value */ public function __construct(NodeInterface $selector, $namespace, $attribute, $operator, $value) { $this->selector = $selector; $this->namespace = $namespace; $this->attribute = $attribute; $this->operator = $operator; $this->value = $value; } /** * @return NodeInterface */ public function getSelector() { return $this->selector; } /** * @return string */ public function getNamespace() { return $this->namespace; } /** * @return string */ public function getAttribute() { return $this->attribute; } /** * @return string */ public function getOperator() { return $this->operator; } /** * @return string */ public function getValue() { return $this->value; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); } /** * {@inheritdoc} */ public function __toString() { $attribute = $this->namespace ? $this->namespace.'|'.$this->attribute : $this->attribute; return 'exists' === $this->operator ? sprintf('%s[%s[%s]]', $this->getNodeName(), $this->selector, $attribute) : sprintf("%s[%s[%s %s '%s']]", $this->getNodeName(), $this->selector, $attribute, $this->operator, $this->value); } } PK!xFunctionNode.phpnu[ * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\CssSelector\Node; use Symfony\Component\CssSelector\Parser\Token; /** * Represents a ":()" node. * * This component is a port of the Python cssselector library, * which is copyright Ian Bicking, @see https://github.com/SimonSapin/cssselect. * * @author Jean-François Simon */ class FunctionNode extends AbstractNode { /** * @var NodeInterface */ private $selector; /** * @var string */ private $name; /** * @var Token[] */ private $arguments; /** * @param NodeInterface $selector * @param string $name * @param Token[] $arguments */ public function __construct(NodeInterface $selector, $name, array $arguments = array()) { $this->selector = $selector; $this->name = strtolower($name); $this->arguments = $arguments; } /** * @return NodeInterface */ public function getSelector() { return $this->selector; } /** * @return string */ public function getName() { return $this->name; } /** * @return Token[] */ public function getArguments() { return $this->arguments; } /** * {@inheritdoc} */ public function getSpecificity() { return $this->selector->getSpecificity()->plus(new Specificity(0, 1, 0)); } /** * {@inheritdoc} */ public function __toString() { $arguments = implode(', ', array_map(function (Token $token) { return "'".$token->getValue()."'"; }, $this->arguments)); return sprintf('%s[%s:%s(%s)]', $this->getNodeName(), $this->selector, $this->name, $arguments ? '['.$arguments.']' : ''); } } PK!f ArrayItem.phpnu[ $attributes Additional attributes */ public function __construct(Expr $value, ?Expr $key = null, bool $byRef = false, array $attributes = [], bool $unpack = false) { $this->attributes = $attributes; $this->key = $key; $this->value = $value; $this->byRef = $byRef; $this->unpack = $unpack; } public function getSubNodeNames(): array { return ['key', 'value', 'byRef', 'unpack']; } public function getType(): string { return 'ArrayItem'; } } // @deprecated compatibility alias class_alias(ArrayItem::class, Expr\ArrayItem::class); PK!ߓ,,Expr/BinaryOp/Pipe.phpnu['; } public function getType(): string { return 'Expr_BinaryOp_Pipe'; } } PK!IExpr/Cast/Void_.phpnu[ $attributes Additional attributes */ public function __construct(Expr $var, $name, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; } public function getSubNodeNames(): array { return ['var', 'name']; } public function getType(): string { return 'Expr_NullsafePropertyFetch'; } } PK!Yw  Expr/CallLike.phpnu[ */ abstract public function getRawArgs(): array; /** * Returns whether this call expression is actually a first class callable. */ public function isFirstClassCallable(): bool { $rawArgs = $this->getRawArgs(); return count($rawArgs) === 1 && current($rawArgs) instanceof VariadicPlaceholder; } /** * Assert that this is not a first-class callable and return only ordinary Args. * * @return Arg[] */ public function getArgs(): array { assert(!$this->isFirstClassCallable()); return $this->getRawArgs(); } /** * Retrieves a specific argument from the raw arguments. * * Returns the named argument that matches the given `$name`, or the * positional (unnamed) argument that exists at the given `$position`, * otherwise, returns `null` for first-class callables or if no match is found. */ public function getArg(string $name, int $position): ?Arg { if ($this->isFirstClassCallable()) { return null; } foreach ($this->getRawArgs() as $i => $arg) { if ($arg->unpack) { continue; } if ( ($arg->name !== null && $arg->name->toString() === $name) || ($arg->name === null && $i === $position) ) { return $arg; } } return null; } } PK!jExpr/Throw_.phpnu[ $attributes Additional attributes */ public function __construct(Node\Expr $expr, array $attributes = []) { $this->attributes = $attributes; $this->expr = $expr; } public function getSubNodeNames(): array { return ['expr']; } public function getType(): string { return 'Expr_Throw'; } } PK!}Expr/NullsafeMethodCall.phpnu[ Arguments */ public array $args; /** * Constructs a nullsafe method call node. * * @param Expr $var Variable holding object * @param string|Identifier|Expr $name Method name * @param array $args Arguments * @param array $attributes Additional attributes */ public function __construct(Expr $var, $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->args = $args; } public function getSubNodeNames(): array { return ['var', 'name', 'args']; } public function getType(): string { return 'Expr_NullsafeMethodCall'; } public function getRawArgs(): array { return $this->args; } } PK!!'Expr/Match_.phpnu[ $attributes Additional attributes */ public function __construct(Node\Expr $cond, array $arms = [], array $attributes = []) { $this->attributes = $attributes; $this->cond = $cond; $this->arms = $arms; } public function getSubNodeNames(): array { return ['cond', 'arms']; } public function getType(): string { return 'Expr_Match'; } } PK!;77Stmt/Block.phpnu[ $attributes Additional attributes */ public function __construct(array $stmts, array $attributes = []) { $this->attributes = $attributes; $this->stmts = $stmts; } public function getType(): string { return 'Stmt_Block'; } public function getSubNodeNames(): array { return ['stmts']; } } PK!cwStmt/EnumCase.phpnu[ $attrGroups PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, ?Node\Expr $expr = null, array $attrGroups = [], array $attributes = []) { parent::__construct($attributes); $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->expr = $expr; $this->attrGroups = $attrGroups; } public function getSubNodeNames(): array { return ['attrGroups', 'name', 'expr']; } public function getType(): string { return 'Stmt_EnumCase'; } } PK!**Stmt/Enum_.phpnu[ null : Scalar type * 'implements' => array() : Names of implemented interfaces * 'stmts' => array() : Statements * 'attrGroups' => array() : PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, array $subNodes = [], array $attributes = []) { $this->name = \is_string($name) ? new Node\Identifier($name) : $name; $this->scalarType = $subNodes['scalarType'] ?? null; $this->implements = $subNodes['implements'] ?? []; $this->stmts = $subNodes['stmts'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; parent::__construct($attributes); } public function getSubNodeNames(): array { return ['attrGroups', 'name', 'scalarType', 'implements', 'stmts']; } public function getType(): string { return 'Stmt_Enum'; } } PK!XDeclareItem.phpnu[value pair node. * * @param string|Node\Identifier $key Key * @param Node\Expr $value Value * @param array $attributes Additional attributes */ public function __construct($key, Node\Expr $value, array $attributes = []) { $this->attributes = $attributes; $this->key = \is_string($key) ? new Node\Identifier($key) : $key; $this->value = $value; } public function getSubNodeNames(): array { return ['key', 'value']; } public function getType(): string { return 'DeclareItem'; } } // @deprecated compatibility alias class_alias(DeclareItem::class, Stmt\DeclareDeclare::class); PK!vS MatchArm.phpnu[ */ public ?array $conds; public Expr $body; /** * @param null|list $conds */ public function __construct(?array $conds, Node\Expr $body, array $attributes = []) { $this->conds = $conds; $this->body = $body; $this->attributes = $attributes; } public function getSubNodeNames(): array { return ['conds', 'body']; } public function getType(): string { return 'MatchArm'; } } PK!00PropertyItem.phpnu[ $attributes Additional attributes */ public function __construct($name, ?Node\Expr $default = null, array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Node\VarLikeIdentifier($name) : $name; $this->default = $default; } public function getSubNodeNames(): array { return ['name', 'default']; } public function getType(): string { return 'PropertyItem'; } } // @deprecated compatibility alias class_alias(PropertyItem::class, Stmt\PropertyProperty::class); PK!࢈44 Attribute.phpnu[ Attribute arguments */ public array $args; /** * @param Node\Name $name Attribute name * @param list $args Attribute arguments * @param array $attributes Additional node attributes */ public function __construct(Name $name, array $args = [], array $attributes = []) { $this->attributes = $attributes; $this->name = $name; $this->args = $args; } public function getSubNodeNames(): array { return ['name', 'args']; } public function getType(): string { return 'Attribute'; } } PK!hg g PropertyHook.phpnu[ 0 : Flags * 'byRef' => false : Whether hook returns by reference * 'params' => array(): Parameters * 'attrGroups' => array(): PHP attribute groups * @param array $attributes Additional attributes */ public function __construct($name, $body, array $subNodes = [], array $attributes = []) { $this->attributes = $attributes; $this->name = \is_string($name) ? new Identifier($name) : $name; $this->body = $body; $this->flags = $subNodes['flags'] ?? 0; $this->byRef = $subNodes['byRef'] ?? false; $this->params = $subNodes['params'] ?? []; $this->attrGroups = $subNodes['attrGroups'] ?? []; } public function returnsByRef(): bool { return $this->byRef; } public function getParams(): array { return $this->params; } public function getReturnType() { return null; } /** * Whether the property hook is final. */ public function isFinal(): bool { return (bool) ($this->flags & Modifiers::FINAL); } public function getStmts(): ?array { if ($this->body instanceof Expr) { $name = $this->name->toLowerString(); if ($name === 'get') { return [new Return_($this->body)]; } if ($name === 'set') { if (!$this->hasAttribute('propertyName')) { throw new \LogicException( 'Can only use getStmts() on a "set" hook if the "propertyName" attribute is set'); } $propName = $this->getAttribute('propertyName'); $prop = new PropertyFetch(new Variable('this'), (string) $propName); return [new Expression(new Assign($prop, $this->body))]; } throw new \LogicException('Unknown property hook "' . $name . '"'); } return $this->body; } public function getAttrGroups(): array { return $this->attrGroups; } public function getType(): string { return 'PropertyHook'; } public function getSubNodeNames(): array { return ['attrGroups', 'flags', 'byRef', 'name', 'params', 'body']; } } PK!YCY55Scalar/Float_.phpnu[ $attributes Additional attributes */ public function __construct(float $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } public function getSubNodeNames(): array { return ['value']; } /** * @param mixed[] $attributes */ public static function fromString(string $str, array $attributes = []): Float_ { $attributes['rawValue'] = $str; $float = self::parse($str); return new Float_($float, $attributes); } /** * @internal * * Parses a DNUMBER token like PHP would. * * @param string $str A string number * * @return float The parsed number */ public static function parse(string $str): float { $str = str_replace('_', '', $str); // Check whether this is one of the special integer notations. if ('0' === $str[0]) { // hex if ('x' === $str[1] || 'X' === $str[1]) { return hexdec($str); } // bin if ('b' === $str[1] || 'B' === $str[1]) { return bindec($str); } // oct, but only if the string does not contain any of '.eE'. if (false === strpbrk($str, '.eE')) { // substr($str, 0, strcspn($str, '89')) cuts the string at the first invalid digit // (8 or 9) so that only the digits before that are used. return octdec(substr($str, 0, strcspn($str, '89'))); } } // dec return (float) $str; } public function getType(): string { return 'Scalar_Float'; } } // @deprecated compatibility alias class_alias(Float_::class, DNumber::class); PK!ǢPScalar/InterpolatedString.phpnu[ $attributes Additional attributes */ public function __construct(array $parts, array $attributes = []) { $this->attributes = $attributes; $this->parts = $parts; } public function getSubNodeNames(): array { return ['parts']; } public function getType(): string { return 'Scalar_InterpolatedString'; } } // @deprecated compatibility alias class_alias(InterpolatedString::class, Encapsed::class); PK!PCCScalar/MagicConst/Property.phpnu[ $attributes Additional attributes */ public function __construct(int $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } public function getSubNodeNames(): array { return ['value']; } /** * Constructs an Int node from a string number literal. * * @param string $str String number literal (decimal, octal, hex or binary) * @param array $attributes Additional attributes * @param bool $allowInvalidOctal Whether to allow invalid octal numbers (PHP 5) * * @return Int_ The constructed LNumber, including kind attribute */ public static function fromString(string $str, array $attributes = [], bool $allowInvalidOctal = false): Int_ { $attributes['rawValue'] = $str; $str = str_replace('_', '', $str); if ('0' !== $str[0] || '0' === $str) { $attributes['kind'] = Int_::KIND_DEC; return new Int_((int) $str, $attributes); } if ('x' === $str[1] || 'X' === $str[1]) { $attributes['kind'] = Int_::KIND_HEX; return new Int_(hexdec($str), $attributes); } if ('b' === $str[1] || 'B' === $str[1]) { $attributes['kind'] = Int_::KIND_BIN; return new Int_(bindec($str), $attributes); } if (!$allowInvalidOctal && strpbrk($str, '89')) { throw new Error('Invalid numeric literal', $attributes); } // Strip optional explicit octal prefix. if ('o' === $str[1] || 'O' === $str[1]) { $str = substr($str, 2); } // use intval instead of octdec to get proper cutting behavior with malformed numbers $attributes['kind'] = Int_::KIND_OCT; return new Int_(intval($str, 8), $attributes); } public function getType(): string { return 'Scalar_Int'; } } // @deprecated compatibility alias class_alias(Int_::class, LNumber::class); PK!(dNCCComplexType.phpnu[ $attributes Additional attributes */ public function __construct( Expr\Variable $var, ?Node\Expr $default = null, array $attributes = [] ) { $this->attributes = $attributes; $this->var = $var; $this->default = $default; } public function getSubNodeNames(): array { return ['var', 'default']; } public function getType(): string { return 'StaticVar'; } } // @deprecated compatibility alias class_alias(StaticVar::class, Stmt\StaticVar::class); PK!lClosureUse.phpnu[ $attributes Additional attributes */ public function __construct(Expr\Variable $var, bool $byRef = false, array $attributes = []) { $this->attributes = $attributes; $this->var = $var; $this->byRef = $byRef; } public function getSubNodeNames(): array { return ['var', 'byRef']; } public function getType(): string { return 'ClosureUse'; } } // @deprecated compatibility alias class_alias(ClosureUse::class, Expr\ClosureUse::class); PK!wEF|VariadicPlaceholder.phpnu[ $attributes Additional attributes */ public function __construct(array $attributes = []) { $this->attributes = $attributes; } public function getType(): string { return 'VariadicPlaceholder'; } public function getSubNodeNames(): array { return []; } } PK!Q/AttributeGroup.phpnu[ $attributes Additional node attributes */ public function __construct(array $attrs, array $attributes = []) { $this->attributes = $attributes; $this->attrs = $attrs; } public function getSubNodeNames(): array { return ['attrs']; } public function getType(): string { return 'AttributeGroup'; } } PK!3RRInterpolatedStringPart.phpnu[ $attributes Additional attributes */ public function __construct(string $value, array $attributes = []) { $this->attributes = $attributes; $this->value = $value; } public function getSubNodeNames(): array { return ['value']; } public function getType(): string { return 'InterpolatedStringPart'; } } // @deprecated compatibility alias class_alias(InterpolatedStringPart::class, Scalar\EncapsedStringPart::class); PK! AIntersectionType.phpnu[ $attributes Additional attributes */ public function __construct(array $types, array $attributes = []) { $this->attributes = $attributes; $this->types = $types; } public function getSubNodeNames(): array { return ['types']; } public function getType(): string { return 'IntersectionType'; } } PK!Q+͍ UseItem.phpnu[ $attributes Additional attributes */ public function __construct(Node\Name $name, $alias = null, int $type = Use_::TYPE_UNKNOWN, array $attributes = []) { $this->attributes = $attributes; $this->type = $type; $this->name = $name; $this->alias = \is_string($alias) ? new Identifier($alias) : $alias; } public function getSubNodeNames(): array { return ['type', 'name', 'alias']; } /** * Get alias. If not explicitly given this is the last component of the used name. */ public function getAlias(): Identifier { if (null !== $this->alias) { return $this->alias; } return new Identifier($this->name->getLast()); } public function getType(): string { return 'UseItem'; } } // @deprecated compatibility alias class_alias(UseItem::class, Stmt\UseUse::class); PK!6+ TagTest.phpnuIwPK!9gg8ParentTest.phpnuIwPK!g22 &HtmlTest.phpnuIwPK!Nu  YChildrenTest.phpnuIwPK!b VfTextTest.phpnuIwPK!  ziNode.phpnuIwPK!u*,~NodeWalkerEvent.phpnuIwPK!{zzNodeWalker.phpnuIwPK!JWVarLikeIdentifier.phpnu[PK! ܍Const_.phpnu[PK!Ii NullableType.phpnu[PK!kQKbb ȔScalar.phpnu[PK!Ym"dStmt.phpnu[PK!֖ E !UnionType.phpnu[PK!'+Arg.phpnu[PK!<#EEMIdentifier.phpnu[PK!*/ЦFunctionLike.phpnu[PK!I0Scalar/LNumber.phpnu[PK!s!CScalar/String_.phpnu[PK!w^ZScalar/EncapsedStringPart.phpnu[PK!V&Scalar/DNumber.phpnu[PK!_^77Scalar/MagicConst/Line.phpnu[PK!Oּ==Scalar/MagicConst/Method.phpnu[PK!77Scalar/MagicConst/File.phpnu[PK!M+/44Scalar/MagicConst/Dir.phpnu[PK!e;;Scalar/MagicConst/Trait_.phpnu[PK!GG Scalar/MagicConst/Namespace_.phpnu[PK!;@N;;Scalar/MagicConst/Class_.phpnu[PK!^RDD1Scalar/MagicConst/Function_.phpnu[PK!ԸeGZZScalar/MagicConst.phpnu[PK!]AAcScalar/Encapsed.phpnu[PK!ɒ!Name/FullyQualified.phpnu[PK!lNName/Relative.phpnu[PK!}序Expr.phpnu[PK!?MStmt/Static_.phpnu[PK!fu=^Stmt/Const_.phpnu[PK!b b dStmt/Property.phpnu[PK!kjStmt/Expression.phpnu[PK!MM Stmt/DeclareDeclare.phpnu[PK! Stmt/Use_.phpnu[PK!qStmt/Return_.phpnu[PK!;6} Stmt/For_.phpnu[PK!)M)--XStmt/Interface_.phpnu[PK!r:: Stmt/ElseIf_.phpnu[PK!ZceeBStmt/Case_.phpnu[PK!oJStmt/Goto_.phpnu[PK!'' Stmt/Nop.phpnu[PK!ƙ{Stmt/Else_.phpnu[PK! 5OStmt/HaltCompiler.phpnu[PK!)%%Stmt/TraitUseAdaptation.phpnu[PK!BǬStmt/Label.phpnu[PK!_^W!Stmt/Unset_.phpnu[PK!9t33 #Stmt/Do_.phpnu[PK!}]ZZ]'Stmt/Catch_.phpnu[PK!UޜTT+Stmt/ClassConst.phpnu[PK!ݯM4Stmt/TryCatch.phpnu[PK!|//8Stmt/Trait_.phpnu[PK! oQ=Stmt/InlineHTML.phpnu[PK!gM'@Stmt/Declare_.phpnu[PK!XCStmt/Global_.phpnu[PK!< FStmt/ClassLike.phpnu[PK! >66SStmt/While_.phpnu[PK!F..yVStmt/Throw_.phpnu[PK!ll@YStmt/ClassMethod.phpnu[PK!WkStmt/Foreach_.phpnu[PK!355rStmt/UseUse.phpnu[PK!_ݾpp StStmt/If_.phpnu[PK!DAyStmt/Continue_.phpnu[PK!_|4911 }Stmt/StaticVar.phpnu[PK! }~Stmt/Echo_.phpnu[PK!_a((NStmt/Switch_.phpnu[PK!"ESSStmt/PropertyProperty.phpnu[PK!ެ>ARStmt/Break_.phpnu[PK!]TS!KStmt/TraitUseAdaptation/Alias.phpnu[PK!!Ұ&Stmt/TraitUseAdaptation/Precedence.phpnu[PK!&XyyStmt/TraitUse.phpnu[PK!wٖStmt/Finally_.phpnu[PK!q*"Stmt/Namespace_.phpnu[PK!\ Stmt/Class_.phpnu[PK!$|%%Stmt/GroupUse.phpnu[PK!Qp p Stmt/Function_.phpnu[PK!b!!Name.phpnu[PK!u^ Param.phpnu[PK!_EExpr/PostDec.phpnu[PK!A  xExpr/Closure.phpnu[PK!v||Expr/PreDec.phpnu[PK!XMfExpr/StaticCall.phpnu[PK!=hfExpr/Exit_.phpnu[PK!+6Expr/Include_.phpnu[PK!)Expr/ShellExec.phpnu[PK!D GG[ Expr/BinaryOp.phpnu[PK!PExpr/FuncCall.phpnu[PK!Expr/YieldFrom.phpnu[PK!?(Expr/Isset_.phpnu[PK!{%}}Expr/Eval_.phpnu[PK!X ^Expr/ArrowFunction.phpnu[PK!h??&Expr/Array_.phpnu[PK!&>*Expr/UnaryPlus.phpnu[PK!ѫ,Expr/PostInc.phpnu[PK!R?A/Expr/AssignOp.phpnu[PK!.2Expr/BitwiseNot.phpnu[PK!jU5Expr/Error.phpnu[PK!{)\\8Expr/Instanceof_.phpnu[PK!4 ||]<Expr/PreInc.phpnu[PK!;?Expr/PropertyFetch.phpnu[PK!E//CExpr/BinaryOp/Concat.phpnu[PK!$@@ DExpr/BinaryOp/GreaterOrEqual.phpnu[PK!-)66FExpr/BinaryOp/ShiftLeft.phpnu[PK!hA988GExpr/BinaryOp/ShiftRight.phpnu[PK!+\))IExpr/BinaryOp/Mul.phpnu[PK!@44JExpr/BinaryOp/Coalesce.phpnu[PK!}99LExpr/BinaryOp/LogicalXor.phpnu[PK!11MExpr/BinaryOp/Greater.phpnu[PK!Os11OExpr/BinaryOp/Smaller.phpnu[PK!44PExpr/BinaryOp/NotEqual.phpnu[PK! >$--QExpr/BinaryOp/Minus.phpnu[PK!66rSExpr/BinaryOp/LogicalOr.phpnu[PK!55TExpr/BinaryOp/BitwiseOr.phpnu[PK!;%88sVExpr/BinaryOp/BooleanAnd.phpnu[PK!S ;77WExpr/BinaryOp/Spaceship.phpnu[PK!@**yYExpr/BinaryOp/Pow.phpnu[PK!377ZExpr/BinaryOp/Identical.phpnu[PK!5^==j\Expr/BinaryOp/NotIdentical.phpnu[PK!OWz99]Expr/BinaryOp/LogicalAnd.phpnu[PK!(77z_Expr/BinaryOp/BitwiseXor.phpnu[PK!=))`Expr/BinaryOp/Mod.phpnu[PK!_u66kbExpr/BinaryOp/BooleanOr.phpnu[PK!a@@ cExpr/BinaryOp/SmallerOrEqual.phpnu[PK!hN77|eExpr/BinaryOp/BitwiseAnd.phpnu[PK!Ul{))fExpr/BinaryOp/Div.phpnu[PK!#++mhExpr/BinaryOp/Plus.phpnu[PK!=|..iExpr/BinaryOp/Equal.phpnu[PK!zrbSkExpr/Print_.phpnu[PK!*nExpr/Ternary.phpnu[PK!155rExpr/ClosureUse.phpnu[PK!1boosExpr/List_.phpnu[PK!R>wExpr/UnaryMinus.phpnu[PK!W0 zExpr/Assign.phpnu[PK!&8r}}R}Expr/Variable.phpnu[PK!77Expr/AssignRef.phpnu[PK!&IՌExpr/BooleanNot.phpnu[PK!5]NNXExpr/Yield_.phpnu[PK!,Fj3Expr/MethodCall.phpnu[PK!N?UMM %Expr/New_.phpnu[PK!,Expr/ConstFetch.phpnu[PK!i*Expr/Empty_.phpnu[PK![g\Expr/Cast/Array_.phpnu[PK!DbbrExpr/Cast/String_.phpnu[PK!8Expr/Cast/Unset_.phpnu[PK! /Expr/Cast/Object_.phpnu[PK!@[XXHExpr/Cast/Int_.phpnu[PK!nJ \\Expr/Cast/Bool_.phpnu[PK!ckޓExpr/Cast/Double.phpnu[PK!u#11VExpr/ArrayItem.phpnu[PK!sPG77 ɤExpr/Cast.phpnu[PK!n=Expr/ErrorSuppress.phpnu[PK!FExpr/StaticPropertyFetch.phpnu[PK! z}}[Expr/Clone_.phpnu[PK!N'&Expr/ClassConstFetch.phpnu[PK!=R669Expr/ArrayDimFetch.phpnu[PK!NsQExpr/AssignOp/Concat.phpnu[PK!\Expr/AssignOp/ShiftLeft.phpnu[PK!jExpr/AssignOp/ShiftRight.phpnu[PK!KExpr/AssignOp/Mul.phpnu[PK!mExpr/AssignOp/Coalesce.phpnu[PK!Expr/AssignOp/Minus.phpnu[PK!RYqƿExpr/AssignOp/BitwiseOr.phpnu[PK!!Expr/AssignOp/Pow.phpnu[PK!@sExpr/AssignOp/BitwiseXor.phpnu[PK!)qSExpr/AssignOp/Mod.phpnu[PK!&h;uExpr/AssignOp/BitwiseAnd.phpnu[PK!-64Expr/AssignOp/Div.phpnu[PK!)Expr/AssignOp/Plus.phpnu[PK!,+?CombinedSelectorNode.phpnu[PK!rINodeInterface.phpnu[PK!SelectorNode.phpnu[PK!pM2AbstractNode.phpnu[PK!Г^FFElementNode.phpnu[PK!.22 PseudoNode.phpnu[PK! i }ClassNode.phpnu[PK!bbNegationNode.phpnu[PK!xKSpecificity.phpnu[PK!#^[ HashNode.phpnu[PK!FK K AttributeNode.phpnu[PK!xIFunctionNode.phpnu[PK!f ArrayItem.phpnu[PK!ߓ,,Expr/BinaryOp/Pipe.phpnu[PK!IExpr/Cast/Void_.phpnu[PK!w"Expr/NullsafePropertyFetch.phpnu[PK!Yw  ;#Expr/CallLike.phpnu[PK!j*Expr/Throw_.phpnu[PK!}d-Expr/NullsafeMethodCall.phpnu[PK!!'2Expr/Match_.phpnu[PK!;776Stmt/Block.phpnu[PK!cw8Stmt/EnumCase.phpnu[PK!**=Stmt/Enum_.phpnu[PK!X DDeclareItem.phpnu[PK!vS *HMatchArm.phpnu[PK!00JPropertyItem.phpnu[PK!࢈44 bOAttribute.phpnu[PK!hg g RPropertyHook.phpnu[PK!YCY55z`Scalar/Float_.phpnu[PK!ǢPhScalar/InterpolatedString.phpnu[PK!PCClScalar/MagicConst/Property.phpnu[PK!{mf= snScalar/Int_.phpnu[PK!(dNCCxComplexType.phpnu[PK!`a$ zStaticVar.phpnu[PK!l(~ClosureUse.phpnu[PK!wEF|3VariadicPlaceholder.phpnu[PK!Q/AttributeGroup.phpnu[PK!3RRЇInterpolatedStringPart.phpnu[PK! AlIntersectionType.phpnu[PK!Q+͍ IUseItem.phpnu[PKE