private function parseComposite($value, &$i = 0)
    {
        $result = [];
        $length = strlen($value);
        for(++$i; $i < $length; ++$i) {
            switch ($value[$i]) {
                case ')':
                    break 2;
                case ',':
                    if (empty($result)) {
                        $result[] = null;
                    }
                    if (in_array($value[$i + 1], [',', ')'], true)) {
                        $result[] = null;
                    }
                    break;
                default:
                    $result[] = $this->parseString($value, $i);
            }
        }

        return $result;
    }
private function parseComposite($value, &$i = 0)
    {
        $result = [];
        $length = strlen($value);
        for(++$i; $i < $length; ++$i) {
            switch ($value[$i]) {
                case ')':
                    break 2;
                case ',':
                    if (empty($result)) {
                        $result[] = null;
                    }
                    if (in_array($value[$i + 1], [',', ')'], true)) {
                        $result[] = null;
                    }
                    break;
                default:
                    $result[] = $this->parseString($value, $i);
            }
        }

        return $result;
    }
private function parseComposite ( $ value , & $ i = 0 ) { $ result = [ ] ; $ length = strlen ( $ value ) ; for ( ++ $ i ; $ i < $ length ; ++ $ i ) { switch ( $ value [ $ i ] ) { case ')' : break 2 ; case ',' : if ( empty ( $ result ) ) { $ result [ ] = null ; } if ( in_array ( $ value [ $ i + 1 ] , [ ',' , ')' ] , true ) ) { $ result [ ] = null ; } break ; default : $ result [ ] = $ this -> parseString ( $ value , $ i ) ; } } return $ result ; }
Parses PostgreSQL composite type encoded in string

@param string $value
@param int $i parse starting position
@return array
Parses PostgreSQL composite type encoded in string