wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
Visitor Class Reference
+ Inheritance diagram for Visitor:

Public Member Functions

 startIterator (&$iterator)
 
 startArray (&$array)
 
 visit (&$obj)
 
 doPreVisit ()
 
 doPostVisit ()
 

Detailed Description

Visitor is used to extend an object's functionality by not extending its interface. Classes to use with the Visitor must implement the acceptVisitor() method. Visitor implements the 'Visitor Pattern'. It implements the 'Template Method Pattern' to allow subclasses to do any Pre- and Post Visit operations (doPreVisit() and doPostVisit() methods). The abstract base class Visitor defines the interface for all specialized Visitor classes.

wCMF - wemove Content Management Framework Copyright (C) 2005-2014 wemove digital solutions GmbH

Licensed under the terms of any of the following licenses at your choice:

See the license.txt file distributed with this work for additional information.

Id:
class.Visitor.php 1462 2014-02-04 23:52:27Z iherwig
Author
ingo herwig ingo@.nosp@m.wemo.nosp@m.ve.co.nosp@m.m

Definition at line 34 of file class.Visitor.php.

Member Function Documentation

Visitor::startIterator ( $iterator)

Start the visiting process by iterating over all objects using the given NodeIterator. The visit() method is called by every visited object.

Parameters
iteratorA reference to the NodeIterator to use (configured with the start object).

Definition at line 42 of file class.Visitor.php.

References doPostVisit(), and doPreVisit().

+ Here is the call graph for this function:

Visitor::startArray ( $array)

Start the visiting process by iterating over all elements of a given array. The visit() method is called by every visited object.

Parameters
arrayAn array holding references to the objects to visit.

Definition at line 58 of file class.Visitor.php.

References doPostVisit(), and doPreVisit().

+ Here is the call graph for this function:

Visitor::visit ( $obj)

Visit the current object in iteration. Subclasses of Visitor override this method to implement the specialized functionality.

Parameters
objA reference to the current object.

Definition at line 72 of file class.Visitor.php.

References WCMFException\throwEx().

+ Here is the call graph for this function:

Visitor::doPreVisit ( )

Subclasses may override this method to do any operations before the visiting process here.

Definition at line 79 of file class.Visitor.php.

Referenced by startArray(), and startIterator().

Visitor::doPostVisit ( )

Subclasses may override this method to do any operations after the visiting process here.

Definition at line 83 of file class.Visitor.php.

Referenced by startArray(), and startIterator().


The documentation for this class was generated from the following file: