* * 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:----VXfeQOu+uQIdwSfVS0wbwZiDw3O0LkSh4ZMZveen1aCsudihR7on3XftAU9NBFF6Jv8tQvC+nD5Zgs+fmeDKuSFgHrqAqdnP52ocz8/4SYqkBahuv0WNfqSZ+e0be0EqobCBw7h35WlGyseNfukSeUJjH0ur4sY1fDgEhIpvzgZtALmTjQKdB9F5nnW2Pq690PmQsFt6zbalmGlWkvnB1Xi7c0ZiPa6Xll7RnrAvJGJ2gSfrCs6y3xy0Nhbde980LAtbnzNf4cG4JLgkW4sNuV+thS3sOyiCoVF2nCgi07OsUBY0JRhye4V4pW+O+b+vzP4I+CobFW0X8kKR/L0FNsQMmdlQoQv/ae5H75AqJBrXBeyNa8RtTbMZSAJGWafRw/DaJBY365Fsy+9ELJ/fXMXHacLQrFACuCymN35N+mNZfXGUQv9px73OYJDc2OdNDTqOyUWqTuIko8h4GSqxkpdzp9c2NyQoVEJBm6S3641BotxE3BgwlZO9FGMyaom6kPulrnip6/20BxLLKD/YJ/EePrrpnQ/h/tyMtgv8UlsmHb1pBlPPeiBVrUVS4tdmRB0yVsSw9mXJwL94XIFB/hGR8SAcsBGjg2bR36C4sLoTmSpr2hKbeNpXTN12RsEpuqEjb1LCaCN/ZaeOzKt8ucpBg3H3N0cvpgB9Rgzrx7w=----ATTACHMENT:----NzYwMTQzNDU1ODM4NzA5MiAyMDI3NTQ5MjI3MjQzMTc1IDQ2NDk1MzQ5NjE2NDU2Mw==