@param array $match
@param array $except

@return \Asvae\ApiTester\Collections\RouteCollection
349847
public function get($match = [], $except = [])
    {
        return $this->routes->filterMatch($match)
            ->filterExcept($except)
            ->values();
    }
368393
private function getControllerFromMatch($match = array())
    {
        try {
            $target = explode("#", $match["target"]);
            return Controller::factory($target[0]);
        } catch (Exception $e) {
            // The controller did not exist, we don't care at this point.
            // We'll just ignore the route.
        }

        return Controller::factory("App");
    }
891438
public function cloneWithoutBindings(array $except)
    {
        return tap(clone $this, function ($clone) use ($except) {
            foreach ($except as $type) {
                $clone->bindings[$type] = [];
            }
        });
    }
35764
private function internalGet($request, $match){
        $model = new Tenant_Configuration();
        $model = $model->getOne("`key`='" . $match['key'] . "'");
        return $model;
    }
1057092
public function map($methods, $match, $callback)
    {
        return $this->routeService->attach($methods, $match, $callback);
    }
843128
public function collect(Request $request, Response $response, \Exception $exception = null)
    {
        $collection = $this->container->get('routing');

        $_routes = $collection->all();

        $routes = array();

        foreach ($_routes as $routeName => $route) {
            $defaults = $route->getDefaults();
            $requirements = $route->getRequirements();

            $controller = isset($defaults['_controller']) ? $defaults['_controller'] : 'unknown';

            if (is_object($controller)) {
                $controller = get_class($controller);
            } elseif ($this->container->hasDefinition($controller)) {
                $controllerDefinition = $this->container->findDefinition($controller);
                /*  @var $controllerDefinition \Symfony\Component\DependencyInjection\Definition */
                $controller = '@'.$controller.' - '.$controllerDefinition->getClass();
            }

            $routes[$routeName] = array(
                'name' => $routeName,
                'pattern' => $route->getPattern(),
                'controller' => $controller,
                'method' => isset($requirements['_method']) ? $requirements['_method'] : 'ANY',
                'action' => isset($defaults['_action']) ? $defaults['_action'] : 'n/a',
            );
        }
        ksort($routes);
        $this->data['matchRoute'] = $request->attributes->get('_route');
        $this->data['routes'] = $routes;

        $this->data['resources'] = array();

        // get BB route sources
        foreach ($this->container->get('bbapp')->getConfig()->getDebugData() as $configFile => $configData) {
            if ('route.yml' == basename($configFile)) {
                $this->data['resources'][$configFile] = $configData;
            } elseif (array_key_exists('route', $configData)) {
                $this->data['resources'][$configFile] = $configData['route'];
            }
        }

        // get bundle route sources
        foreach ($this->container->get('bbapp')->getBundles() as $bundle) {
            foreach ($bundle->getConfig()->getDebugData() as $configFile => $configData) {
                if ('route.yml' == basename($configFile)) {
                    $this->data['resources'][$configFile] = $configData;
                } elseif (array_key_exists('route', $configData)) {
                    $this->data['resources'][$configFile] = $configData['route'];
                }
            }
        }
    }
1164376
public function get ($request, $match)
    {
        if (isset($match['collectionId'])) {
            $collectionId = $match['collectionId'];
        } else {
            $collectionId = $request->REQUEST['collectionId'];
        }
        $collection = Pluf_Shortcuts_GetObjectOr404('Collection_Collection', 
                $collectionId);
        $document = Pluf_Shortcuts_GetObjectOr404('Collection_Document', 
                $match['documentId']);
        if ($document->collection !== $collection->id) {
            throw new Pluf_Exception_DoesNotExist(
                    'Document with id (' . $document->id .
                             ') does not exist in collection with id (' .
                             $collection->id . ')');
        }
        return new Pluf_HTTP_Response_Json($document);
    }
650777
public function except($keys): CollectionInterface
    {
        if (!is_callable($keys)) {
            if (!is_array($keys)) {
                $keys = func_get_args();
            }
            $keys = function ($item, $key) use ($keys) {
                return in_array($key, $keys, false);
            };
        }

        return $this->wrap(function (Iterator $data) use ($keys) {
            foreach ($data as $key => $item) {
                if (!$keys($item, $key)) {
                    yield $key => $item;
                }
            }
        });
    }
661852
public function deleteByKey($request, $match){
        $model = $this->internalGet($request, $match);
        if (! isset($model)) {
            throw new Pluf_Exception_DoesNotExist('Setting not found');
        }
        $model->delete();
        return $model;
    }
1150370
public function pluckCallback(Collection $collection, $key, array $matches)
    {
        $indexes = explode(',', $key);
        $result = array();
        foreach ($indexes as $idx) {
            $idx = trim($idx);
            if ($idx != '') {
                if (array_key_exists($idx, $this->contents)) {
                    $result[$idx] = $this->contents[$idx];
                }
            }
        }
        return $result;
    }
1257217
public function cloneWithout(array $except)
	{
		return $this->cloneWith(function ($clone) use ($except) {
			foreach ($except as $property) {
				$clone->{$property} = null;
			}
		});
	}
498254
public function getFilesOfDirs(array $dirs, $match = '/\.php$/')
    {
        $iterator = new AppendIterator();

        foreach ($dirs as $dir) {
            $iterator->append(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir)));
        }

        return new RegexIterator($iterator, $match);
    }
1078946
public function create($request, $match)
    {
        $receipt = Bank_Service::create($request, $request->REQUEST);
        return $receipt;
    }
284920
private function orElseMatch(Match $match)
    {
        return array_key_exists($this->subject->getName(), $this->matches)
            ? $this->matches[$this->subject->getName()]->get()
            : $match->get();
    }
144748
public function buildFilterCallback(array $except = [])
    {
        $filter = $this;

        return function ($path) use ($filter, $except) {
            return !$filter->filter([$path], $except, true);
        };
    }
714174
public function execute($matches) {
		if (is_string($this->callable)) { // If the callable is a string, call the action of controller
			$params = explode('#', $this->callable);

            if (count($params) == 2) {
                $controllerPrefix = $params[0];
                $controllerPrefix = str_replace(':', '\\', $controllerPrefix);

    			$controller = $controllerPrefix."Controller";

    			$controller = new $controller();
    			$action = $params[1].'Action';

    			return call_user_func_array(array($controller, $action), $matches);


    			return $controller->$action();

            } else {
                throw new RouterException('Invalid controller name '.$this->callable);
            }

		} else { // If the callable is a function, execute the function
			return call_user_func_array($this->callable, $matches);
		}
	}
1289301
public function buildHashMatch($match, &$params)
    {
        $parts = [];

        foreach ($match as $column => $value) {
            $parts[] = $this->buildMatchColumn($column) . ' ' . $this->buildMatchValue($value, $params);
        }

        return count($parts) === 1 ? $parts[0] : '(' . implode(') (', $parts) . ')';
    }