Source for file Visitable.php
Documentation is available at Visitable.php
* "THE BEER-WARE LICENSE" (Revision 42):
* "Sven Strittmatter" <ausserirdisch@sven-space.de> wrote this file.
* As long as you retain this notice you can do whatever you want with
* this stuff. If we meet some day, and you think this stuff is worth it,
* you can buy me a beer in return.
* @package MediaSearch_Interface
* @copyright Copyright (c) 2009 Sven Strittmatter
* Objects implementing this interface are visitable by any objects
* implementing the MediaSearch_Interface_Visitor. This interface is part
* of the visitor pattern implementation in MediaSearch. See GoF for more
* @package MediaSearch_Interface
* @copyright Copyright (c) 2009 Sven Strittmatter
* Acceptps any visitor implementing MediaSearch_Interface_Visitor.
* Use this method on your visitable objects to accept the visitor
* object and then visit it. For this purpose every visitor implementing
* MediaSearch_Interface_Visitor provides the method visit(). You pass the
* visitable object to the visitors visit method, so the visitor can collect
* some data. After that the visited object can give the visitor next to
* ist child objects to visit them, if they implement
* MediaSearch_Interface_Visitable, too.
* class MyVisitable implements MediaSearch_Interface_Visitable {
* public function acceptVisitor(MediaSearch_Interface_Visitor $visitor) {
* $visitor->visit($this);
* foreach ($this->childs as $child) {
* $child->acceptVisitor($visitor);
* @param MediaSearch_Interface_Visitor $visitor
public function acceptVisitor(MediaSearch_Interface_Visitor $visitor);
|