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.
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
-
$outputStrategy OutputStrategy 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
-
$strategy OutputStrategy 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
-
$obj PersistentObject 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.