Files
kiri-router/src/DataGrip.php
T

27 lines
360 B
PHP
Raw Normal View History

2023-04-15 23:29:27 +08:00
<?php
namespace Kiri\Message\Handler;
use Kiri;
class DataGrip
{
private array $servers = [];
/**
* @param $type
* @return RouterCollector
*/
public function get($type): RouterCollector
{
if (!isset($this->servers[$type])) {
$this->servers[$type] = Kiri::getDi()->create(RouterCollector::class);
}
return $this->servers[$type];
}
}