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.

Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

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)
 

Constructor & Destructor Documentation

◆ __construct()

__construct (   $outputStrategy = null)

Constructor.

Parameters
$outputStrategyOutputStrategy instance to use (If 'null', a DefaultOutputStrategy will be used).

Definition at line 32 of file OutputVisitor.php.

Member Function Documentation

◆ setOutputStrategy()

setOutputStrategy (   $strategy)

Set the PersistenceStrategy.

Parameters
$strategyOutputStrategy instance to use.

Definition at line 45 of file OutputVisitor.php.

◆ visit()

visit (   $obj)

Visit the current object in iteration and output its content using the configured OutputStrategy.

Parameters
$objPersistentObject instance

Reimplemented from Visitor.

Definition at line 54 of file OutputVisitor.php.

◆ doPreVisit()

doPreVisit ( )

Output the document header.

Reimplemented from Visitor.

Definition at line 61 of file OutputVisitor.php.

◆ doPostVisit()

doPostVisit ( )

Output the document footer.

Reimplemented from Visitor.

Definition at line 68 of file OutputVisitor.php.