Ejemplo n.º 1
0
 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]);
         }
     }
 }
Ejemplo n.º 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;
 }