Doctrine


Doctrine\ORM\Query\Printer
/Doctrine/ORM/Query/Printer.php at line 33

Class Printer

Printer

public class Printer

A parse tree printer for Doctrine Query Language parser.

Author:
Janne Vanhala
License:
http://www.opensource.org/licenses/lgpl-license.php LGPL
See Also:
http://www.phpdoctrine.org
Since:
2.0
Version:
$Revision$

Field Summary
protected int

$_indent

Current indentation level

protected bool

$_silent

Defines whether parse tree is printed (default, false) or not (true).

Constructor Summary

Printer(bool silent)

Constructs a new parse tree printer.

Method Summary
void

endProduction()

Decreases indentation level by one and prints a closing parenthesis.

void

println(string str)

Prints text indented with spaces depending on current indentation level.

void

startProduction(string name)

Prints an opening parenthesis followed by production name and increases indentation level by one.

Field Detail

/Doctrine/ORM/Query/Printer.php at line 40

_indent

protected int $_indent

Current indentation level


/Doctrine/ORM/Query/Printer.php at line 47

_silent

protected bool $_silent

Defines whether parse tree is printed (default, false) or not (true).


Constructor Detail

/Doctrine/ORM/Query/Printer.php at line 54

Printer

public Printer(bool silent)

Constructs a new parse tree printer.

Parameters:
silent - Parse tree will not be printed if true.

Method Detail

/Doctrine/ORM/Query/Printer.php at line 78

endProduction

public void endProduction()

Decreases indentation level by one and prints a closing parenthesis.

This method is called after executing a production.


/Doctrine/ORM/Query/Printer.php at line 89

println

public void println(string str)

Prints text indented with spaces depending on current indentation level.

Parameters:
str - text

/Doctrine/ORM/Query/Printer.php at line 67

startProduction

public void startProduction(string name)

Prints an opening parenthesis followed by production name and increases indentation level by one.

This method is called before executing a production.

Parameters:
name - production name

Doctrine