src/Yggdrasil/Core/Driver/DriverCollection.php
public function add(string $key, string $driver): void
    {
        if (!in_array(DriverInterface::class, class_implements($driver))) {
            throw new NotDriverProvidedException($key . ' is not a driver.');
        }

        $this->drivers[$key] = $driver;
    }
public function add(string $key, string $driver): void
    {
        if (!in_array(DriverInterface::class, class_implements($driver))) {
            throw new NotDriverProvidedException($key . ' is not a driver.');
        }

        $this->drivers[$key] = $driver;
    }
public function add ( string $ key , string $ driver ) : void { if ( ! in_array ( DriverInterface :: class , class_implements ( $ driver ) ) ) { throw new NotDriverProvidedException ( $ key . ' is not a driver.' ) ; } $ this -> drivers [ $ key ] = $ driver ; }
Adds driver to collection

@param string $key Name of driver
@param string $driver
@throws NotDriverProvidedException if given object is of another instance than DriverInterface
Adds driver to collection