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]); } } }
/** * 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; }