From 8e0126a125bcd186e3562211e42b3ee23707031b Mon Sep 17 00:00:00 2001 From: Thierry Bela Date: Sat, 24 Sep 2022 14:31:28 -0400 Subject: [PATCH] #110 revert docs change --- README.md | 12 ++++++------ docs/README.md | 12 ++++++------ docs/traverser.md | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/README.md b/README.md index ad876e6c..4b5fae47 100755 --- a/README.md +++ b/README.md @@ -412,12 +412,12 @@ Example using ast ```php -use TBela\CSS\Ast\NodeWalker; +use TBela\CSS\Ast\Traverser; use TBela\CSS\Parser; use TBela\CSS\Renderer; $parser = (new Parser())->load('ast/media.css'); -$traverser = new NodeWalker(); +$traverser = new Traverser(); $renderer = new Renderer(['remove_empty_nodes' => true]); $ast = $parser->getAst(); @@ -427,7 +427,7 @@ $traverser->on('enter', function ($node) { if ($node->type == 'AtRule' && $node->name == 'media' && $node->value == 'print') { - return NodeWalker::IGNORE_NODE; + return Traverser::IGNORE_NODE; } }); @@ -439,12 +439,12 @@ Example using an Element instance ```php -use TBela\CSS\Ast\NodeWalker; +use TBela\CSS\Ast\Traverser; use TBela\CSS\Parser; use TBela\CSS\Renderer; $parser = (new Parser())->load('ast/media.css'); -$traverser = new NodeWalker(); +$traverser = new Traverser(); $renderer = new Renderer(['remove_empty_nodes' => true]); $element = $parser->parse(); @@ -454,7 +454,7 @@ $traverser->on('enter', function ($node) { if ($node->type == 'AtRule' && $node->name == 'media' && $node->value == 'print') { - return NodeWalker::IGNORE_NODE; + return Traverser::IGNORE_NODE; } }); diff --git a/docs/README.md b/docs/README.md index 5ee68532..4d3470a7 100755 --- a/docs/README.md +++ b/docs/README.md @@ -412,12 +412,12 @@ Example using ast ```php -use TBela\CSS\Ast\NodeWalker; +use TBela\CSS\Ast\Traverser; use TBela\CSS\Parser; use TBela\CSS\Renderer; $parser = (new Parser())->load('ast/media.css'); -$traverser = new NodeWalker(); +$traverser = new Traverser(); $renderer = new Renderer(['remove_empty_nodes' => true]); $ast = $parser->getAst(); @@ -427,7 +427,7 @@ $traverser->on('enter', function ($node) { if ($node->type == 'AtRule' && $node->name == 'media' && $node->value == 'print') { - return NodeWalker::IGNORE_NODE; + return Traverser::IGNORE_NODE; } }); @@ -439,12 +439,12 @@ Example using an Element instance ```php -use TBela\CSS\Ast\NodeWalker; +use TBela\CSS\Ast\Traverser; use TBela\CSS\Parser; use TBela\CSS\Renderer; $parser = (new Parser())->load('ast/media.css'); -$traverser = new NodeWalker(); +$traverser = new Traverser(); $renderer = new Renderer(['remove_empty_nodes' => true]); $element = $parser->parse(); @@ -454,7 +454,7 @@ $traverser->on('enter', function ($node) { if ($node->type == 'AtRule' && $node->name == 'media' && $node->value == 'print') { - return NodeWalker::IGNORE_NODE; + return Traverser::IGNORE_NODE; } }); diff --git a/docs/traverser.md b/docs/traverser.md index 714ec57a..22cbaca8 100755 --- a/docs/traverser.md +++ b/docs/traverser.md @@ -22,15 +22,15 @@ add a callback for the specified event ```php -use TBela\CSS\Ast\NodeWalker; +use TBela\CSS\Ast\Traverser; -$traverser = new NodeWalker(); +$traverser = new Traverser(); $callable = function ($node) { // remove @media print {} if ($node->type == 'AtRule' && $node->value == 'print') { - return NodeWalker::IGNORE_NODE; + return Traverser::IGNORE_NODE; } }; @@ -52,15 +52,15 @@ remove a callback for the specified event ```php -use TBela\CSS\Ast\NodeWalker; +use TBela\CSS\Ast\Traverser; -$traverser = new NodeWalker(); +$traverser = new Traverser(); $callable = function ($node) { // remove @media print {} if ($node->type == 'AtRule' && $node->value == 'print') { - return NodeWalker::IGNORE_NODE; + return Traverser::IGNORE_NODE; } };