src/POData/ObjectModel/ObjectModelSerializerBase.php
/**
     * Pushes a segment for the current navigation property being written out.
     * Note: Refer 'ObjectModelSerializerNotes.txt' for more details about
     * 'Segment Stack' and this method.
     * Note: Calls to this method should be balanced with calls to popSegment.
     * 
     * @param ResourceProperty &$resourceProperty The current navigation property
     * being written out.
     * 
     * @return bool true if a segment was pushed, false otherwise
     * 
     * @throws InvalidOperationException If this function invoked with non-navigation
     *                                   property instance.
     */
Pushes a segment for the current navigation property being written out.
Note: Refer 'ObjectModelSerializerNotes.txt' for more details about
'Segment Stack' and this method.
Note: Calls to this method should be balanced with calls to popSegment.

@param ResourceProperty &$resourceProperty The current navigation property
being written out.

@return bool true if a segment was pushed, false otherwise

@throws InvalidOperationException If this function invoked with non-navigation
property instance.
Pushes a segment for the current navigation property being written out . Note : Refer ' ObjectModelSerializerNotes . txt ' for more details about ' Segment Stack ' and this method . Note : Calls to this method should be balanced with calls to popSegment . @param ResourceProperty &$resourceProperty The current navigation property being written out . @return bool true if a segment was pushed false otherwise @throws InvalidOperationException If this function invoked with non - navigation property instance .
protected function pushSegmentForNavigationProperty(ResourceProperty &$resourceProperty)
    {
        if ($resourceProperty->getTypeKind() == ResourceTypeKind::ENTITY) {
            $this->assert(!empty($this->_segmentNames), '!is_empty($this->_segmentNames');
            $currentResourceSetWrapper = $this->getCurrentResourceSetWrapper();
            $currentResourceType = $currentResourceSetWrapper->getResourceType();
            $currentResourceSetWrapper = $this->service
                ->getProvidersWrapper()
                ->getResourceSetWrapperForNavigationProperty(
                    $currentResourceSetWrapper, 
                    $currentResourceType, 
                    $resourceProperty
                );
            $this->assert(!is_null($currentResourceSetWrapper), '!null($currentResourceSetWrapper)');
            return $this->_pushSegment($resourceProperty->getName(), $currentResourceSetWrapper);
        } else {
            throw new InvalidOperationException('pushSegmentForNavigationProperty should not be called with non-entity type');
        }
    }
protected function pushSegmentForNavigationProperty ( ResourceProperty & $ resourceProperty ) { if ( $ resourceProperty -> getTypeKind ( ) == ResourceTypeKind :: ENTITY ) { $ this -> assert ( ! empty ( $ this -> _segmentNames ) , '!is_empty($this->_segmentNames' ) ; $ currentResourceSetWrapper = $ this -> getCurrentResourceSetWrapper ( ) ; $ currentResourceType = $ currentResourceSetWrapper -> getResourceType ( ) ; $ currentResourceSetWrapper = $ this -> service -> getProvidersWrapper ( ) -> getResourceSetWrapperForNavigationProperty ( $ currentResourceSetWrapper , $ currentResourceType , $ resourceProperty ) ; $ this -> assert ( ! is_null ( $ currentResourceSetWrapper ) , '!null($currentResourceSetWrapper)' ) ; return $ this -> _pushSegment ( $ resourceProperty -> getName ( ) , $ currentResourceSetWrapper ) ; } else { throw new InvalidOperationException ( 'pushSegmentForNavigationProperty should not be called with non-entity type' ) ; } }
Pushes a segment for the current navigation property being written out.
Pushes a segment for the current navigation property being written out .