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

            $resourceName = strtolower($resourceName);
            $id = $properties['id'];

            if ($resourceName === 'all') {
                $id = 'all';
            }

            if (is_null($id) || empty($id)) {
                throw new Zend_Application_Resource_Exception(
                    sprintf(
                        $this->_missingPropertyMessage, 'ID', 'resource', $resourceName
                    )
                );
            }

            $this->_addResourceById($resources, $id);
        }
    }
protected function _addResources(array $resources) {
        foreach ($resources as $resourceName => $properties) {
            // If the properties aren't set as an array, then we will consider
            // the value as the resource ID.
            if (!is_array($properties)) {
                $properties = array('id' => $properties);
            }

            $resourceName = strtolower($resourceName);
            $id = $properties['id'];

            if ($resourceName === 'all') {
                $id = 'all';
            }

            if (is_null($id) || empty($id)) {
                throw new Zend_Application_Resource_Exception(
                    sprintf(
                        $this->_missingPropertyMessage, 'ID', 'resource', $resourceName
                    )
                );
            }

            $this->_addResourceById($resources, $id);
        }
    }
protected function _addResources ( array $ resources ) { foreach ( $ resources as $ resourceName => $ properties ) { // If the properties aren't set as an array, then we will consider // the value as the resource ID. if ( ! is_array ( $ properties ) ) { $ properties = array ( 'id' => $ properties ) ; } $ resourceName = strtolower ( $ resourceName ) ; $ id = $ properties [ 'id' ] ; if ( $ resourceName === 'all' ) { $ id = 'all' ; } if ( is_null ( $ id ) || empty ( $ id ) ) { throw new Zend_Application_Resource_Exception ( sprintf ( $ this -> _missingPropertyMessage , 'ID' , 'resource' , $ resourceName ) ) ; } $ this -> _addResourceById ( $ resources , $ id ) ; } }
Method used to add our specified resources to our ACL instance and create
any rules if specified.

@param array $resources
@return void
Method used to add our specified resources to our ACL instance and create any rules if specified .