src/Connection/Wait/Wait.php
public static function persistent(string $dsn, ...$params)
    {
        if (count($params) === 1) {
            $callback = $params[0];
        } else {
            [$attempts, $callback] = $params;
        }

        $wait = new static();
        $wait->with(new PdoWait());
        $wait->attempts($attempts ?? self::DEFAULT_ATTEMPTS);
        $wait->options([
            PDO::ATTR_PERSISTENT => true
        ]);

        $wait->start($dsn, $callback);

        return;
    }
public static function persistent(string $dsn, ...$params)
    {
        if (count($params) === 1) {
            $callback = $params[0];
        } else {
            [$attempts, $callback] = $params;
        }

        $wait = new static();
        $wait->with(new PdoWait());
        $wait->attempts($attempts ?? self::DEFAULT_ATTEMPTS);
        $wait->options([
            PDO::ATTR_PERSISTENT => true
        ]);

        $wait->start($dsn, $callback);

        return;
    }
public static function persistent ( string $ dsn , ... $ params ) { if ( count ( $ params ) === 1 ) { $ callback = $ params [ 0 ] ; } else { [ $ attempts , $ callback ] = $ params ; } $ wait = new static ( ) ; $ wait -> with ( new PdoWait ( ) ) ; $ wait -> attempts ( $ attempts ?? self :: DEFAULT_ATTEMPTS ) ; $ wait -> options ( [ PDO :: ATTR_PERSISTENT => true ] ) ; $ wait -> start ( $ dsn , $ callback ) ; return ; }
TODO refactor Connection Waiter.

@param string $dsn
@param array $params
TODO refactor Connection Waiter .