This commit is contained in:
2021-08-17 16:43:50 +08:00
parent 539ba488e9
commit 5b1e28c323
80 changed files with 232 additions and 396 deletions
+40
View File
@@ -0,0 +1,40 @@
<?php
declare(strict_types=1);
namespace Http\Route;
/**
* Class Any
* @package Kiri\Kiri\Route
*/
class Any
{
private array $nodes = [];
/**
* Any constructor.
* @param array $nodes
*/
public function __construct(array $nodes)
{
$this->nodes = $nodes;
}
/**
* @param $name
* @param $arguments
* @return $this
*/
public function __call($name, $arguments): static
{
foreach ($this->nodes as $node) {
$node->{$name}(...$arguments);
}
return $this;
}
}