wCMF  3.6
 All Classes Namespaces Files Functions Variables Groups Pages
class.MapVisitor.php
Go to the documentation of this file.
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2014 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of any of the following licenses
7  * at your choice:
8  *
9  * - GNU Lesser General Public License (LGPL)
10  * http://www.gnu.org/licenses/lgpl.html
11  * - Eclipse Public License (EPL)
12  * http://www.eclipse.org/org/documents/epl-v10.php
13  *
14  * See the license.txt file distributed with this work for
15  * additional information.
16  *
17  * $Id: class.MapVisitor.php 1462 2014-02-04 23:52:27Z iherwig $
18  */
19 require_once(BASE."wcmf/lib/visitor/class.Visitor.php");
20 /**
21  * @class MapVisitor
22  * @ingroup Visitor
23  * @brief The MapVisitor is used to extract data from the visited objects into an associative array.
24  * Subclasses define the map structure and content.
25  *
26  * @author ingo herwig <ingo@wemove.com>
27  */
28 class MapVisitor extends Visitor
29 {
30  var $_map = null;
31  /**
32  * Get the map.
33  * @return An associative array.
34  */
35  function getMap()
36  {
37  return $this->_map;
38  }
39 }
40 ?>
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.
The MapVisitor is used to extract data from the visited objects into an associative array...