e
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
<?php
|
||||
|
||||
|
||||
namespace HttpServer\Route;
|
||||
|
||||
|
||||
/**
|
||||
* Class Any
|
||||
* @package BeReborn\Route
|
||||
*/
|
||||
class Any
|
||||
{
|
||||
|
||||
private $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)
|
||||
{
|
||||
foreach ($this->nodes as $node) {
|
||||
$node->{$name}(...$arguments);
|
||||
}
|
||||
return $this;
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user