src/Base/Configurator.php
public function useProtocol(string $protocolClass)
    {
        if (!is_subclass_of($protocolClass, AbstractProtocol::class)) {
            throw new ConfiguratorException('Unknown protocol class: ' . $protocolClass . '.');
        }
        if (!class_exists($protocolClass)) {
            throw new ConfiguratorException('The protocol class "' . $protocolClass . '" is not exists.');
        }
        $this->protocolClass = $protocolClass;
    }
public function useProtocol(string $protocolClass)
    {
        if (!is_subclass_of($protocolClass, AbstractProtocol::class)) {
            throw new ConfiguratorException('Unknown protocol class: ' . $protocolClass . '.');
        }
        if (!class_exists($protocolClass)) {
            throw new ConfiguratorException('The protocol class "' . $protocolClass . '" is not exists.');
        }
        $this->protocolClass = $protocolClass;
    }
public function useProtocol ( string $ protocolClass ) { if ( ! is_subclass_of ( $ protocolClass , AbstractProtocol :: class ) ) { throw new ConfiguratorException ( 'Unknown protocol class: ' . $ protocolClass . '.' ) ; } if ( ! class_exists ( $ protocolClass ) ) { throw new ConfiguratorException ( 'The protocol class "' . $ protocolClass . '" is not exists.' ) ; } $ this -> protocolClass = $ protocolClass ; }
@param string $protocolClass

@throws ConfiguratorException
@param string $protocolClass