src/A1comms/GaeSupportLaravel/Database/Connectors/ConnectionFactory.php
/**
     * Create a new Closure that resolves to a PDO instance with a specific socket or an array of sockets.
     *
     * @param  array  $config
     * @return \Closure
     */
Create a new Closure that resolves to a PDO instance with a specific socket or an array of sockets.
@param  array  $config
@return \Closure
Create a new Closure that resolves to a PDO instance with a specific socket or an array of sockets . @param array $config @return \ Closure
protected function createPdoResolverWithSockets(array $config)
    {
        return function () use ($config) {
            foreach (Arr::shuffle($sockets = $this->parseSockets($config)) as $key => $socket) {
                $config['unix_socket'] = $socket;
                \Log::info('Connecting to DB unix_socket: ' . $socket);
                try {
                    return $this->createConnector($config)->connect($config);
                } catch (PDOException $e) {
                    if (count($sockets) - 1 === $key && $this->container->bound(ExceptionHandler::class)) {
                        $this->container->make(ExceptionHandler::class)->report($e);
                    }
                }
            }
            throw $e;
        };
    }
protected function createPdoResolverWithSockets ( array $ config ) { return function ( ) use ( $ config ) { foreach ( Arr :: shuffle ( $ sockets = $ this -> parseSockets ( $ config ) ) as $ key => $ socket ) { $ config [ 'unix_socket' ] = $ socket ; \ Log :: info ( 'Connecting to DB unix_socket: ' . $ socket ) ; try { return $ this -> createConnector ( $ config ) -> connect ( $ config ) ; } catch ( PDOException $ e ) { if ( count ( $ sockets ) - 1 === $ key && $ this -> container -> bound ( ExceptionHandler :: class ) ) { $ this -> container -> make ( ExceptionHandler :: class ) -> report ( $ e ) ; } } } throw $ e ; } ; }
Create a new Closure that resolves to a PDO instance with a specific socket or an array of sockets.
Create a new Closure that resolves to a PDO instance with a specific socket or an array of sockets .