bjyoungblood/BjyAuthorize — pull request #6 by adamlundrigan (2012-07-12 15:22:06+00:00)
Title: Reconfigure Service\Authorize::addRoles to recursively add parent roles if they don't already exist

Background: When setting up my roles using the ZendDb provider, I inserted them in the "wrong" order:
```
mysql> select * from user_role;
+-------------+---------+--------+
| role_id | default | parent |
+-------------+---------+--------+
| guest | 1 | NULL |
| super_admin | 0 | user |
| user | 0 | guest |
+-------------+---------+--------+
```

The attached
Since roles are added in the order they are returned from the db query, this triggered exceptions:
```
Zend\Acl\Exception\InvalidArgumentException: Role 'user' not found
Zend\Acl\Exception\InvalidArgumentException: Parent Role id "user" does not exist
```

Attached code changes `BjyAuthorize\Service\Authorize::addRoles` to add any referenced parents before adding the child role to ACL.