Initial Commit

This commit is contained in:
Kilian Hofmann
2021-06-01 19:54:59 +02:00
commit 052cbe3038
17 changed files with 1004 additions and 0 deletions
+44
View File
@@ -0,0 +1,44 @@
<?php
namespace GermanAirlinesVa\Graphql\Classes;
use File;
use Cms\Classes\Router;
class GraphRouter //extends Router
{
/**
* @var array A list of parameters names and values extracted from the URL pattern and URL string.
*/
protected $parameters = [];
public function __construct($parameters)
{
$this->parameters = $parameters;
}
/**
* Returns the current routing parameters.
* @return array
*/
public function getParameters()
{
return $this->parameters;
}
/**
* Returns a routing parameter.
* @return array
*/
public function getParameter($name, $default = null)
{
if (isset($this->parameters[$name]) && !empty($this->parameters[$name])) {
return $this->parameters[$name];
}
return $default;
}
}