lib/Doctrine/DBAL/Driver/OCI8/OCI8Statement.php
private static function findPlaceholderOrOpeningQuote(
        $statement,
        &$tokenOffset,
        &$fragmentOffset,
        &$fragments,
        &$currentLiteralDelimiter,
        &$paramMap
    ) {
        $token = self::findToken($statement, $tokenOffset, '/[?\'"]/');

        if (! $token) {
            return false;
        }

        if ($token === '?') {
            $position            = count($paramMap) + 1;
            $param               = ':param' . $position;
            $fragments[]         = substr($statement, $fragmentOffset, $tokenOffset - $fragmentOffset);
            $fragments[]         = $param;
            $paramMap[$position] = $param;
            $tokenOffset        += 1;
            $fragmentOffset      = $tokenOffset;

            return true;
        }

        $currentLiteralDelimiter = $token;
        ++$tokenOffset;

        return true;
    }
private static function findPlaceholderOrOpeningQuote(
        $statement,
        &$tokenOffset,
        &$fragmentOffset,
        &$fragments,
        &$currentLiteralDelimiter,
        &$paramMap
    ) {
        $token = self::findToken($statement, $tokenOffset, '/[?\'"]/');

        if (! $token) {
            return false;
        }

        if ($token === '?') {
            $position            = count($paramMap) + 1;
            $param               = ':param' . $position;
            $fragments[]         = substr($statement, $fragmentOffset, $tokenOffset - $fragmentOffset);
            $fragments[]         = $param;
            $paramMap[$position] = $param;
            $tokenOffset        += 1;
            $fragmentOffset      = $tokenOffset;

            return true;
        }

        $currentLiteralDelimiter = $token;
        ++$tokenOffset;

        return true;
    }
private static function findPlaceholderOrOpeningQuote ( $ statement , & $ tokenOffset , & $ fragmentOffset , & $ fragments , & $ currentLiteralDelimiter , & $ paramMap ) { $ token = self :: findToken ( $ statement , $ tokenOffset , '/[?\'"]/' ) ; if ( ! $ token ) { return false ; } if ( $ token === '?' ) { $ position = count ( $ paramMap ) + 1 ; $ param = ':param' . $ position ; $ fragments [ ] = substr ( $ statement , $ fragmentOffset , $ tokenOffset - $ fragmentOffset ) ; $ fragments [ ] = $ param ; $ paramMap [ $ position ] = $ param ; $ tokenOffset += 1 ; $ fragmentOffset = $ tokenOffset ; return true ; } $ currentLiteralDelimiter = $ token ; ++ $ tokenOffset ; return true ; }
Finds next placeholder or opening quote.

@param string             $statement               The SQL statement to parse
@param string             $tokenOffset             The offset to start searching from
@param int                $fragmentOffset          The offset to build the next fragment from
@param string[]           $fragments               Fragments of the original statement not containing placeholders
@param string|null        $currentLiteralDelimiter The delimiter of the current string literal
or NULL if not currently in a literal
@param array<int, string> $paramMap                Mapping of the original parameter positions to their named replacements

@return bool Whether the token was found
Finds next placeholder or opening quote .