.State 0000666 00000000012 13371317245 0005630 0 ustar 00 finalized
.gitignore 0000666 00000000030 13371317245 0006537 0 ustar 00 /vendor/
/composer.lock
CHANGELOG.md 0000666 00000003254 13371317245 0006373 0 ustar 00 # 2.17.01.16
* Quality: Happy new year! (Alexis von Glasow, 2017-01-09T21:37:12+01:00)
* Documentation: New `README.md` file. (Ivan Enderlin, 2016-10-19T16:38:45+02:00)
* Documentation: Update `support` properties. (Ivan Enderlin, 2016-10-11T08:49:14+02:00)
# 2.16.01.11
* Quality: Drop PHP5.4. (Ivan Enderlin, 2016-01-11T09:15:27+01:00)
* Quality: Run devtools:cs. (Ivan Enderlin, 2016-01-09T09:11:14+01:00)
* Core: Remove `Hoa\Core`. (Ivan Enderlin, 2016-01-09T08:28:17+01:00)
* Consistency: Use `Hoa\Consistency`. (Ivan Enderlin, 2015-12-08T22:13:46+01:00)
# 1.15.08.17
* Add a `.gitignore` file. (Stéphane HULARD, 2015-08-03T11:50:31+02:00)
# 1.15.05.29
* Move to PSR-1 and PSR-2. (Ivan Enderlin, 2015-05-15T10:01:52+02:00)
# 1.15.02.26
* Add the `CHANGELOG.md` file. (Ivan Enderlin, 2015-02-26T08:33:18+01:00)
* Happy new year! (Ivan Enderlin, 2015-01-05T14:56:34+01:00)
# 1.14.12.10
* Move to PSR-4. (Ivan Enderlin, 2014-12-10T08:57:26+01:00)
* Require `hoa/test`. (Alexis von Glasow, 2014-11-26T13:27:32+01:00)
# 1.14.11.15
* Finalizing `Hoa\Visitor`! (Ivan Enderlin, 2014-11-15T22:17:25+01:00)
* Best tests ever. (Ivan Enderlin, 2014-11-15T22:14:50+01:00)
* Remove the unnecessary exception. (Ivan Enderlin, 2014-11-15T22:10:05+01:00)
* Remove `from`/`import` and update to PHP5.4. (Ivan Enderlin, 2014-11-15T22:02:43+01:00)
* Remove the visitor registry. (Ivan Enderlin, 2014-11-15T22:00:34+01:00)
# 0.14.09.23
* Add `branch-alias`. (Stéphane PY, 2014-09-23T11:50:51+02:00)
# 0.14.09.17
* Drop PHP5.3. (Ivan Enderlin, 2014-09-17T17:10:43+02:00)
* Add the installation section. (Ivan Enderlin, 2014-09-17T17:10:30+02:00)
(first snapshot)
Element.php 0000666 00000004234 13371317245 0006663 0 ustar 00
---
Hoa is a modular, extensible and
structured set of PHP libraries.
Moreover, Hoa aims at being a bridge between industrial and research worlds.
# Hoa\Visitor
[![Help on IRC](https://img.shields.io/badge/help-%23hoaproject-ff0066.svg)](https://webchat.freenode.net/?channels=#hoaproject)
[![Help on Gitter](https://img.shields.io/badge/help-gitter-ff0066.svg)](https://gitter.im/hoaproject/central)
[![Documentation](https://img.shields.io/badge/documentation-hack_book-ff0066.svg)](https://central.hoa-project.net/Documentation/Library/Visitor)
[![Board](https://img.shields.io/badge/organisation-board-ff0066.svg)](https://waffle.io/hoaproject/visitor)
This library provides interfaces to apply the visitor pattern.
[Learn more](https://central.hoa-project.net/Documentation/Library/Visitor).
## Installation
With [Composer](https://getcomposer.org/), to include this library into
your dependencies, you need to
require [`hoa/visitor`](https://packagist.org/packages/hoa/visitor):
```sh
$ composer require hoa/visitor '~2.0'
```
For more installation procedures, please read [the Source
page](https://hoa-project.net/Source.html).
## Testing
Before running the test suites, the development dependencies must be installed:
```sh
$ composer install
```
Then, to run all the test suites:
```sh
$ vendor/bin/hoa test:run
```
For more information, please read the [contributor
guide](https://hoa-project.net/Literature/Contributor/Guide.html).
## Quick usage
We propose to explain the basis of this library. We have two entities: an
element to visit and a visitor, for example a node of a tree and a dumper. The
element to visit will implement the `Hoa\Visitor\Element` interface and the
visitor will implement the `Hoa\Visitor\Visit` interface. The first one will ask
to implement the `accept` method in order to define what data it holds will be
visited. The second one will ask to implement the `visit` method which will
contain the visitor computations. We will find several examples in Hoa
libraries.
## Documentation
The
[hack book of `Hoa\Visitor`](https://central.hoa-project.net/Documentation/Library/Visitor)
contains detailed information about how to use this library and how it works.
To generate the documentation locally, execute the following commands:
```sh
$ composer require --dev hoa/devtools
$ vendor/bin/hoa devtools:documentation --open
```
More documentation can be found on the project's website:
[hoa-project.net](https://hoa-project.net/).
## Getting help
There are mainly two ways to get help:
* On the [`#hoaproject`](https://webchat.freenode.net/?channels=#hoaproject)
IRC channel,
* On the forum at [users.hoa-project.net](https://users.hoa-project.net).
## Contribution
Do you want to contribute? Thanks! A detailed [contributor
guide](https://hoa-project.net/Literature/Contributor/Guide.html) explains
everything you need to know.
## License
Hoa is under the New BSD License (BSD-3-Clause). Please, see
[`LICENSE`](https://hoa-project.net/LICENSE) for details.
Test/Unit/Element.php 0000666 00000004121 13371317245 0010514 0 ustar 00 when($result = new \Mock\Hoa\Visitor\Element())
->object($result)
->isInstanceOf('Hoa\Visitor\Element');
}
}
Test/Unit/Visit.php 0000666 00000004111 13371317245 0010220 0 ustar 00 when($result = new \Mock\Hoa\Visitor\Visit())
->object($result)
->isInstanceOf('Hoa\Visitor\Visit');
}
}
Visit.php 0000666 00000004236 13371317245 0006372 0 ustar 00