Symfony2 API
Class

Symfony\Component\Security\Http\AccessMap

class AccessMap implements AccessMapInterface

AccessMap allows configuration of different access control rules for specific parts of the website.

Methods

add(RequestMatcherInterface $requestMatcher, array $roles = array(), string|null $channel = null)

Constructor.

array getPatterns(Request $request)

Returns security attributes and required channel for the supplied request.

Details

at line 34
public add(RequestMatcherInterface $requestMatcher, array $roles = array(), string|null $channel = null)

Constructor.

Parameters

RequestMatcherInterface $requestMatcher A RequestMatcherInterface instance
array $roles An array of roles needed to access the resource
string|null $channel The channel to enforce (http, https, or null)

at line 39
public array getPatterns(Request $request)

Returns security attributes and required channel for the supplied request.

Parameters

Request $request The current request

Return Value

array A tuple of security attributes and the required channel