Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- class Aggregate1
- {
- public function isOption1() {
- return true;
- }
- }
- class Aggregate2
- {
- public function __construct($aggr1) {
- if (!$aggrId1->isOption1()) {
- throw new InvalidStateException();
- }
- $this->aggrId1 = $aggrId1;
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement