public static function make($name, array $options = []): self
    {
        $class = new ReflectionClass($options['class'] ?? static::class);

        /* @var static $instance */
        $instance = $class->newInstanceWithoutConstructor();
        $instance->setName($name);
        $instance->setOptions($options);

        return $instance;
    }
public static function make($name, array $options = []): self
    {
        $class = new ReflectionClass($options['class'] ?? static::class);

        /* @var static $instance */
        $instance = $class->newInstanceWithoutConstructor();
        $instance->setName($name);
        $instance->setOptions($options);

        return $instance;
    }
public static function make ( $ name , array $ options = [ ] ) : self { $ class = new ReflectionClass ( $ options [ 'class' ] ?? static :: class ) ; /* @var static $instance */ $ instance = $ class -> newInstanceWithoutConstructor ( ) ; $ instance -> setName ( $ name ) ; $ instance -> setOptions ( $ options ) ; return $ instance ; }
Make control.

@param string $name
@param array $options

@return Control

@throws \ReflectionException
Make control .