AST
9 months ago
Exec
9 months ago
Expr
9 months ago
Filter
9 months ago
Expr.php
9 months ago
FilterCollection.php
9 months ago
Lexer.php
9 months ago
OutputWalker.php
9 months ago
Parameter.php
9 months ago
ParameterTypeInferer.php
9 months ago
Parser.php
9 months ago
ParserResult.php
9 months ago
Printer.php
9 months ago
QueryException.php
9 months ago
QueryExpressionVisitor.php
9 months ago
ResultSetMapping.php
9 months ago
ResultSetMappingBuilder.php
9 months ago
SqlOutputWalker.php
9 months ago
SqlWalker.php
9 months ago
TokenType.php
9 months ago
TreeWalker.php
9 months ago
TreeWalkerAdapter.php
9 months ago
TreeWalkerChain.php
9 months ago
TreeWalkerChainIterator.php
9 months ago
index.php
9 months ago
Printer.php
31 lines
| 1 | <?php |
| 2 | declare (strict_types=1); |
| 3 | namespace MailPoetVendor\Doctrine\ORM\Query; |
| 4 | if (!defined('ABSPATH')) exit; |
| 5 | use function str_repeat; |
| 6 | class Printer |
| 7 | { |
| 8 | protected $_indent = 0; |
| 9 | protected $_silent; |
| 10 | public function __construct($silent = \false) |
| 11 | { |
| 12 | $this->_silent = $silent; |
| 13 | } |
| 14 | public function startProduction($name) |
| 15 | { |
| 16 | $this->println('(' . $name); |
| 17 | $this->_indent++; |
| 18 | } |
| 19 | public function endProduction() |
| 20 | { |
| 21 | $this->_indent--; |
| 22 | $this->println(')'); |
| 23 | } |
| 24 | public function println($str) |
| 25 | { |
| 26 | if (!$this->_silent) { |
| 27 | echo str_repeat(' ', $this->_indent), $str, "\n"; |
| 28 | } |
| 29 | } |
| 30 | } |
| 31 |