Cloneable Instantiable
public __construct ( array $options = [ ] )

Constructs a NodeDumper.

Supported options:

  • bool dumpComments: Whether comments should be dumped.
  • bool dumpPositions: Whether line/offset information should be dumped. To dump offset
                    information, the code needs to be passed to dump().
  • param array $options Options (see description)
public dump ( $node , ? string $code = NULL ) : string

Dumps a node or array.

  • param array | PhpParser\Node $node Node or array to dump
  • param string | null $code Code corresponding to dumped AST. This only needs to be passed if
    the dumpPositions option is enabled and the dumping of node offsets
    is desired.
  • return string Dumped value
protected dumpFlags ( $flags )
protected dumpIncludeType ( $type )
protected dumpPosition ( PhpParser\Node $node )

Dump node position, if possible.

  • param PhpParser\Node $node Node for which to dump position
  • return string | null Dump of position, or null if position information not available
protected dumpRecursive ( $node )
protected dumpUseType ( $type )
private $code
private $dumpComments
private $dumpPositions
private toColumn ( $code , $pos )
© 2022 Bruce Wells
Search Namespaces \ Classes