summaryrefslogtreecommitdiff
path: root/include/traversable.h
blob: 8ef7f5d9b6915c614cf507d0ab6d5a7f5554cc24 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/**
 *  Traversable.h
 *
 *  Interface that should be implemented by classes that want to be
 *  traversable. A traversable objects can be iterated over in a PHP
 *  foreach loop.
 *
 *  @author Emiel Bruijntjes <emiel.bruijntjes@copernica.com>
 *  @copyright 2014 Copernica BV
 */

/**
 *  Set up namespace
 */
namespace Php {

/**
 *  Class definition
 */
class PHPCPP_EXPORT Traversable
{
public:
    /**
     *  Retrieve an instance of the iterator
     *  @return Iterator
     */
    virtual Iterator *getIterator() = 0;
};

/**
 *  End namespace
 */
}