OutputVisitor Class Reference
Detailed Description
OutputVisitor is used to output an object's content to different destinations and formats.
The spezial output destination/format may be configured by using the corresponding OutputStrategy, which is set using the setOutputStrategy() method.
Definition at line 24 of file OutputVisitor.php.
Inheritance diagram for OutputVisitor:
Public Member Functions | |
__construct ($outputStrategy=null) | |
setOutputStrategy ($strategy) | |
visit ($obj) | |
doPreVisit () | |
doPostVisit () | |
Public Member Functions inherited from Visitor | |
startIterator (NodeIterator $iterator) | |
startArray ($array) | |
visit ($obj) | |
doPreVisit () | |
doPostVisit () | |
Constructor & Destructor Documentation
__construct | ( | $outputStrategy = null | ) |
Constructor.
- Parameters
-
$outputStrategy A reference to an OutputStrategy to use (If 'null', a DefaultOutputStrategy will be used).
Definition at line 32 of file OutputVisitor.php.
Member Function Documentation
setOutputStrategy | ( | $strategy | ) |
Set the PersistenceStrategy.
- Parameters
-
$strategy A reference to an OutputStrategy to use.
Definition at line 45 of file OutputVisitor.php.
visit | ( | $obj | ) |
Visit the current object in iteration and output its content using the configured OutputStrategy.
- Parameters
-
$obj A reference to the current object.
Definition at line 54 of file OutputVisitor.php.
doPreVisit | ( | ) |
Output the document header.
Definition at line 61 of file OutputVisitor.php.
doPostVisit | ( | ) |
Output the document footer.
Definition at line 68 of file OutputVisitor.php.