library/Garp/Application/Resource/Acl.php
protected function _addRoles(array $roles) {
        foreach ($roles as $roleName => $properties) {
            // If the properties aren't set as an array, then we will consider
            // the value as the role ID.
            if (!is_array($properties)) {
                $properties = array('id' => $properties);
            }

            $id = $properties['id'];

            if (is_null($id) || empty($id)) {
                throw new Zend_Application_Resource_Exception(
                    sprintf(
                        $this->_missingPropertyMessage, 'ID', 'role', $roleName
                    )
                );
            }
            $this->_addRoleById($roles, $id);
        }
    }
protected function _addRoles(array $roles) {
        foreach ($roles as $roleName => $properties) {
            // If the properties aren't set as an array, then we will consider
            // the value as the role ID.
            if (!is_array($properties)) {
                $properties = array('id' => $properties);
            }

            $id = $properties['id'];

            if (is_null($id) || empty($id)) {
                throw new Zend_Application_Resource_Exception(
                    sprintf(
                        $this->_missingPropertyMessage, 'ID', 'role', $roleName
                    )
                );
            }
            $this->_addRoleById($roles, $id);
        }
    }
protected function _addRoles ( array $ roles ) { foreach ( $ roles as $ roleName => $ properties ) { // If the properties aren't set as an array, then we will consider // the value as the role ID. if ( ! is_array ( $ properties ) ) { $ properties = array ( 'id' => $ properties ) ; } $ id = $ properties [ 'id' ] ; if ( is_null ( $ id ) || empty ( $ id ) ) { throw new Zend_Application_Resource_Exception ( sprintf ( $ this -> _missingPropertyMessage , 'ID' , 'role' , $ roleName ) ) ; } $ this -> _addRoleById ( $ roles , $ id ) ; } }
Method used to add our specified roles to our ACL instance.

@param array $roles
@return void
Method used to add our specified roles to our ACL instance .