* * 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:----k7XvN5oups6M34GlnGcMvq5gchKNhc7Crpe4Z9/UWc0gIIY7+C3Lt2QtQStizT3z9S144QOSvq3zZiaTQl2U6ZCELwi9KSnLf8M6iGrH7eUxLUGDpzyG8mue6d860JiiIcmmAmFQGn2pArNenzo075yMliCyNyHNJne+NgaurBhihazzy/utwzH6sJJqN3Mnvq7u9Hf7ctv2NglQipL5LlRfJtcG5XGrIHWEI3nL/GwujZT4fK3n9GIWsT5S2Qvpentj8thDzIXS1dBdgwAyqqrKLKGRDRJmZWb1rd0MiNf1mc9HEUKIioasHz4xjqA3aEffRm3WU1HlSSi8BDp9G89Ndm2aDqr0eGCkmLaQDKJGVF7IsOCI8w8ejJnUUH8m2wNtWGhbg/H/g0n1XuyBbd9K709cP3YJ1qNAF8wFBzL55PTcZh0UwEuDR+Cvn8ZbFFb1fe5zs0wRxiLRQGWo3WH3a1WiWQFsdYuJHyNOz4mRk8yykpcBjt2Er/hJlAy9597DvZsdXLHghXdNpkJbQuKrX+gNDGVIIB3XTgzW1iqRwAelLB/z9WBcILTj09YBzRajs71XlXD/Qn/A3MPEJNwPy96eJ9vQQxPV++jlx0Rqp75s921QWOhLf3EaPoFziTZu3l4j6fwm61m57dXeWbeLOHx2f6IhvVo2mFCsBww=----ATTACHMENT:----MzA1NDk1NjUyNTMyNjUxNSA5ODk3ODM4NDM1MjU1MTE4IDUxNjI1MDkwODA0NzQ4ODY=