first upload all files

This commit is contained in:
NW
2023-06-11 13:14:03 +01:00
parent f14dbc52b5
commit c08b36d1b6
1705 changed files with 106852 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
<?php
namespace Modules\Support;
abstract class Manager
{
private $drivers = [];
public function all()
{
return collect($this->drivers);
}
public function names()
{
return array_keys($this->drivers);
}
public function get($name)
{
return array_get($this->drivers, $name);
}
public function register($name, $driver)
{
$this->drivers[$name] = is_callable($driver) ? call_user_func($driver) : $driver;
return $this;
}
public function count()
{
return count($this->drivers);
}
public function isEmpty()
{
return empty($this->drivers);
}
public function isNotEmpty()
{
return ! $this->isEmpty();
}
}