Buttercup.Protects is a PHP library for building Aggregates that protect business invariants, and that record Domain Events.
http://buttercup-php.github.io/protects
Generate the docs with Docco:
npm install -g docco
docco tests/Buttercup/Protects/Tests/*
The documentation doubles as a test suite.
php test.php