protected function connect()
    {
        // Build a database connection if we don't have one connected

        $adapter = '\\Pixie\\ConnectionAdapters\\' . ucfirst(strtolower($this->adapter));

        $adapterInstance = $this->container->build($adapter, array($this->container));

        $pdo = $adapterInstance->connect($this->adapterConfig);
        $this->setPdoInstance($pdo);

        // Preserve the first database connection with a static property
        if (!static::$storedConnection) {
            static::$storedConnection = $this;
        }
    }
protected function connect()
    {
        // Build a database connection if we don't have one connected

        $adapter = '\\Pixie\\ConnectionAdapters\\' . ucfirst(strtolower($this->adapter));

        $adapterInstance = $this->container->build($adapter, array($this->container));

        $pdo = $adapterInstance->connect($this->adapterConfig);
        $this->setPdoInstance($pdo);

        // Preserve the first database connection with a static property
        if (!static::$storedConnection) {
            static::$storedConnection = $this;
        }
    }
protected function connect ( ) { // Build a database connection if we don't have one connected $ adapter = '\\Pixie\\ConnectionAdapters\\' . ucfirst ( strtolower ( $ this -> adapter ) ) ; $ adapterInstance = $ this -> container -> build ( $ adapter , array ( $ this -> container ) ) ; $ pdo = $ adapterInstance -> connect ( $ this -> adapterConfig ) ; $ this -> setPdoInstance ( $ pdo ) ; // Preserve the first database connection with a static property if ( ! static :: $ storedConnection ) { static :: $ storedConnection = $ this ; } }
Create the connection adapter
Create the connection adapter