/** * constructor * order rights object to set roles ,resources, allow, deny * * $identity must have $identity->id and $identity->role * * $rights must have methods: * set_roles * set_allow * set_deny * * @param Identity $identity * @param Rights $rights */ public function __construct($identity, $rights) { // store identity $this->_identity = $identity; // let the rights set the vars on this $rights->set_roles($this); $rights->set_allow($this); $rights->set_deny($this); }