protected function extractFromEndpoints(EndpointCollection $endpoints, $key)
    {
        $items = [
            'index' => [], 'create' => [], 'store' => [], 'show' => [],
            'edit'  => [], 'update' => [], 'destroy' => [],
        ];

        foreach ($this->getEndpointsWithResourceMethods($endpoints, $key) as $endpoint) {
            $items[$endpoint->method] = array_merge($items[$endpoint->method], $endpoint->{$key});
        }

        return $items;
    }
protected function extractFromEndpoints(EndpointCollection $endpoints, $key)
    {
        $items = [
            'index' => [], 'create' => [], 'store' => [], 'show' => [],
            'edit'  => [], 'update' => [], 'destroy' => [],
        ];

        foreach ($this->getEndpointsWithResourceMethods($endpoints, $key) as $endpoint) {
            $items[$endpoint->method] = array_merge($items[$endpoint->method], $endpoint->{$key});
        }

        return $items;
    }
protected function extractFromEndpoints ( EndpointCollection $ endpoints , $ key ) { $ items = [ 'index' => [ ] , 'create' => [ ] , 'store' => [ ] , 'show' => [ ] , 'edit' => [ ] , 'update' => [ ] , 'destroy' => [ ] , ] ; foreach ( $ this -> getEndpointsWithResourceMethods ( $ endpoints , $ key ) as $ endpoint ) { $ items [ $ endpoint -> method ] = array_merge ( $ items [ $ endpoint -> method ] , $ endpoint -> { $ key } ) ; } return $ items ; }
Extract method items from endpoints for the given key.

@param \Collective\Annotations\Routing\Annotations\EndpointCollection $endpoints
@param string                                                         $key

@return array
Extract method items from endpoints for the given key .