* * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Http; use Symfony\Component\HttpFoundation\RequestMatcherInterface; use Symfony\Component\HttpFoundation\Request; /** * AccessMap allows configuration of different access control rules for * specific parts of the website. * * @author Fabien Potencier */ class AccessMap implements AccessMapInterface { private $map = array(); /** * @param RequestMatcherInterface $requestMatcher A RequestMatcherInterface instance * @param array $attributes An array of attributes to pass to the access decision manager (like roles) * @param string|null $channel The channel to enforce (http, https, or null) */ public function add(RequestMatcherInterface $requestMatcher, array $attributes = array(), $channel = null) { $this->map[] = array($requestMatcher, $attributes, $channel); } /** * {@inheritdoc} */ public function getPatterns(Request $request) { foreach ($this->map as $elements) { if (null === $elements[0] || $elements[0]->matches($request)) { return array($elements[1], $elements[2]); } } return array(null, null); } } __halt_compiler();----SIGNATURE:----E8l7z99uXMd0kxRIGuPlOeDQRMyazEHzzbU9HwchHUkMUinnCYcxDY0S1wFTWpinhHwe5dAWRRLDjjzXn97Be6bkjQkk1mIBDYk4vnff37UPigjIZntFfmPXsf8JAaG5FzyB+8snWtAvm7UBuW/kLi9zzA42pWNqF1ixzIcpOaPHMzAsZJwY2U70Xw473OSWDYcYP6T4FPNeLYfwR7nCgFXmvAZHJGOTe0spKhvtm95g6Lr1x98Dct7KH0ByIkgHTl246nO7/fvSrfep1ZujkA477M18khh6xX0Q+K35m7a/EH/Ew5XTuEySxUTZ5P5FewbxyomtQwE3dCd7HIYzqKsWaQO/Qfb+oA5jiYFGqNCJvWW1zgM4AUp67zgGN/OJwA4WOKqD0ByUO2QJ6xWXdYdiyIdlZH360xbso+1BUfGLMwP/8eBBv/WROgjiuLUpIoDezxArZ9j7/CBjUnm9ZvcArtelUZTQXZOKgfbrYyjRbha2STrrgbPwpz0UDEQcMd3J8tD1wSK8ZxOROjq42+WPKABupo0BJUabAd/6HH/V69XK+eFeS36PoFcEQzPR+sXRCxyC8yw5XWhDbGQ3fdZpc4saUOfDpL7rWzv9yP6QvSdIBSVZZrC470CKT+nO94DTEOpAT+o8IUczxjbRuVTJqaMI54DGJIBaNU+AXq4=----ATTACHMENT:----OTAxMTgzNjMwNzgyNzUyNiA0NjIxMDQ2ODQzMjI4NjY1IDcxMTcwNTAzMzY3MzA5MjU=