private function _parse()
    {
        $key                    = null;
        $value                  = null;
        $connectionStringValues = array();

        while (true) {
            $this->_skipWhiteSpaces();

            if ($this->_pos == strlen($this->_value)
                && $this->_state != ConnectionStringParser::EXPECT_VALUE
            ) {
                // Not stopping after the end has been reached and a value is
                // expected results in creating an empty value, which we expect.
                break;
            }

            switch ($this->_state) {
                case ConnectionStringParser::EXPECT_KEY:
                    $key          = $this->_extractKey();
                    $this->_state = ConnectionStringParser::EXPECT_ASSIGNMENT;
                    break;

                case ConnectionStringParser::EXPECT_ASSIGNMENT:
                    $this->_skipOperator('=');
                    $this->_state = ConnectionStringParser::EXPECT_VALUE;
                    break;

                case ConnectionStringParser::EXPECT_VALUE:
                    $value                        = $this->_extractValue();
                    $this->_state                 =
                    ConnectionStringParser::EXPECT_SEPARATOR;
                    $connectionStringValues[$key] = $value;
                    $key                          = null;
                    $value                        = null;
                    break;

                default:
                    $this->_skipOperator(';');
                    $this->_state = ConnectionStringParser::EXPECT_KEY;
                    break;
            }
        }

        // Must end parsing in the valid state (expected key or separator)
        if ($this->_state == ConnectionStringParser::EXPECT_ASSIGNMENT) {
            throw $this->_createException(
                $this->_pos,
                Resources::MISSING_CONNECTION_STRING_CHAR,
                '='
            );
        }

        return $connectionStringValues;
    }
private function _parse()
    {
        $key                    = null;
        $value                  = null;
        $connectionStringValues = array();

        while (true) {
            $this->_skipWhiteSpaces();

            if ($this->_pos == strlen($this->_value)
                && $this->_state != ConnectionStringParser::EXPECT_VALUE
            ) {
                // Not stopping after the end has been reached and a value is
                // expected results in creating an empty value, which we expect.
                break;
            }

            switch ($this->_state) {
                case ConnectionStringParser::EXPECT_KEY:
                    $key          = $this->_extractKey();
                    $this->_state = ConnectionStringParser::EXPECT_ASSIGNMENT;
                    break;

                case ConnectionStringParser::EXPECT_ASSIGNMENT:
                    $this->_skipOperator('=');
                    $this->_state = ConnectionStringParser::EXPECT_VALUE;
                    break;

                case ConnectionStringParser::EXPECT_VALUE:
                    $value                        = $this->_extractValue();
                    $this->_state                 =
                    ConnectionStringParser::EXPECT_SEPARATOR;
                    $connectionStringValues[$key] = $value;
                    $key                          = null;
                    $value                        = null;
                    break;

                default:
                    $this->_skipOperator(';');
                    $this->_state = ConnectionStringParser::EXPECT_KEY;
                    break;
            }
        }

        // Must end parsing in the valid state (expected key or separator)
        if ($this->_state == ConnectionStringParser::EXPECT_ASSIGNMENT) {
            throw $this->_createException(
                $this->_pos,
                Resources::MISSING_CONNECTION_STRING_CHAR,
                '='
            );
        }

        return $connectionStringValues;
    }
private function _parse ( ) { $ key = null ; $ value = null ; $ connectionStringValues = array ( ) ; while ( true ) { $ this -> _skipWhiteSpaces ( ) ; if ( $ this -> _pos == strlen ( $ this -> _value ) && $ this -> _state != ConnectionStringParser :: EXPECT_VALUE ) { // Not stopping after the end has been reached and a value is // expected results in creating an empty value, which we expect. break ; } switch ( $ this -> _state ) { case ConnectionStringParser :: EXPECT_KEY : $ key = $ this -> _extractKey ( ) ; $ this -> _state = ConnectionStringParser :: EXPECT_ASSIGNMENT ; break ; case ConnectionStringParser :: EXPECT_ASSIGNMENT : $ this -> _skipOperator ( '=' ) ; $ this -> _state = ConnectionStringParser :: EXPECT_VALUE ; break ; case ConnectionStringParser :: EXPECT_VALUE : $ value = $ this -> _extractValue ( ) ; $ this -> _state = ConnectionStringParser :: EXPECT_SEPARATOR ; $ connectionStringValues [ $ key ] = $ value ; $ key = null ; $ value = null ; break ; default : $ this -> _skipOperator ( ';' ) ; $ this -> _state = ConnectionStringParser :: EXPECT_KEY ; break ; } } // Must end parsing in the valid state (expected key or separator) if ( $ this -> _state == ConnectionStringParser :: EXPECT_ASSIGNMENT ) { throw $ this -> _createException ( $ this -> _pos , Resources :: MISSING_CONNECTION_STRING_CHAR , '=' ) ; } return $ connectionStringValues ; }
Parses the connection string.

@return array

@throws \RuntimeException
Parses the connection string .