public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)
    {
        $result = $complexValue->results;

        $propertyContent = new ODataPropertyContent();
        $odataProperty = new ODataProperty();
        $odataProperty->name = $propertyName;
        $odataProperty->typeName = $resourceType->getFullName();
        if (null != $result) {
            $internalContent = $this->writeComplexValue($resourceType, $result);
            $odataProperty->value = $internalContent;
        }

        $propertyContent->properties[$propertyName] = $odataProperty;

        return $propertyContent;
    }
public function writeTopLevelComplexObject(QueryResult & $complexValue, $propertyName, ResourceType & $resourceType)
    {
        $result = $complexValue->results;

        $propertyContent = new ODataPropertyContent();
        $odataProperty = new ODataProperty();
        $odataProperty->name = $propertyName;
        $odataProperty->typeName = $resourceType->getFullName();
        if (null != $result) {
            $internalContent = $this->writeComplexValue($resourceType, $result);
            $odataProperty->value = $internalContent;
        }

        $propertyContent->properties[$propertyName] = $odataProperty;

        return $propertyContent;
    }
public function writeTopLevelComplexObject ( QueryResult & $ complexValue , $ propertyName , ResourceType & $ resourceType ) { $ result = $ complexValue -> results ; $ propertyContent = new ODataPropertyContent ( ) ; $ odataProperty = new ODataProperty ( ) ; $ odataProperty -> name = $ propertyName ; $ odataProperty -> typeName = $ resourceType -> getFullName ( ) ; if ( null != $ result ) { $ internalContent = $ this -> writeComplexValue ( $ resourceType , $ result ) ; $ odataProperty -> value = $ internalContent ; } $ propertyContent -> properties [ $ propertyName ] = $ odataProperty ; return $ propertyContent ; }
Write top level complex resource.

@param QueryResult  &$complexValue The complex object to be written
@param string       $propertyName  The name of the complex property
@param ResourceType &$resourceType Describes the type of complex object

@return ODataPropertyContent
Write top level complex resource .