src/POData/UriProcessor/ResourcePathProcessor/SegmentParser/SegmentParser.php
/**
     * Extract identifier and key predicate from a segment
     * 
     * @param string $segment The segment from which identifier and key
     * @param string &$identifier   On return, this parameter will contain identifier part of the segment
     * @param string &$keyPredicate On return, this parameter will contain key predicate part of the segment, null if predicate is absent
     *
     * @throws ODataException If any error occurs while processing segment
     */
Extract identifier and key predicate from a segment

@param string $segment The segment from which identifier and key
@param string &$identifier   On return, this parameter will contain identifier part of the segment
@param string &$keyPredicate On return, this parameter will contain key predicate part of the segment, null if predicate is absent

@throws ODataException If any error occurs while processing segment
Extract identifier and key predicate from a segment @param string $segment The segment from which identifier and key @param string &$identifier On return this parameter will contain identifier part of the segment @param string &$keyPredicate On return this parameter will contain key predicate part of the segment null if predicate is absent @throws ODataException If any error occurs while processing segment
private function extractSegmentIdentifierAndKeyPredicate($segment, &$identifier, &$keyPredicate) {
        $predicateStart = strpos($segment, '(');
        if ($predicateStart === false) {
            $identifier = $segment;
            $keyPredicate = null;
            return;
        }
        $segmentLength = strlen($segment);
        if (strrpos($segment, ')') !== $segmentLength - 1) {
			throw ODataException::createSyntaxError(Messages::syntaxError());
        }
        $identifier = substr($segment, 0, $predicateStart);
        $predicateStart++;
        $keyPredicate = substr($segment, $predicateStart, $segmentLength - $predicateStart - 1);
    }
private function extractSegmentIdentifierAndKeyPredicate ( $ segment , & $ identifier , & $ keyPredicate ) { $ predicateStart = strpos ( $ segment , '(' ) ; if ( $ predicateStart === false ) { $ identifier = $ segment ; $ keyPredicate = null ; return ; } $ segmentLength = strlen ( $ segment ) ; if ( strrpos ( $ segment , ')' ) !== $ segmentLength - 1 ) { throw ODataException :: createSyntaxError ( Messages :: syntaxError ( ) ) ; } $ identifier = substr ( $ segment , 0 , $ predicateStart ) ; $ predicateStart ++ ; $ keyPredicate = substr ( $ segment , $ predicateStart , $ segmentLength - $ predicateStart - 1 ) ; }
Extract identifier and key predicate from a segment
Extract identifier and key predicate from a segment