예제 #1
0
파일: Enforcer.php 프로젝트: psecio/invoke
 public function addMatch(\Psecio\Invoke\RouteContainer $route)
 {
     $config = $route->getConfig();
     foreach ($config as $index => $option) {
         if ($this->isValidOption($index)) {
             $found = $this->options[$index];
             // make a match for this type
             $this->matches[] = Match::create($found, ['data' => $option]);
         }
     }
 }
예제 #2
0
 /**
  * Initialize the container with the provided route and
  *     configuration information
  *
  * @param string $route Route to provide to the match
  * @param array $config Route configuration
  */
 public function __construct($route, array $config)
 {
     $this->route = \Psecio\Invoke\Match::create('route.regex', array('route' => $route));
     $this->config = $config;
 }