src/MediaServices/MediaServicesRestProxy.php
protected function wrapAtomEntry($entity, array $links = null)
    {
        Validate::notNull($entity, 'entity');

        $content = new Content();
        $content->setType(Resources::XML_CONTENT_TYPE);
        $content->setText(ContentPropertiesSerializer::serialize($entity));

        $atomEntry = new Entry();
        $atomEntry->setContent($content);

        if ($links) {
            $atomEntry->setLink($links);
        }

        $xmlWriter = new \XMLWriter();
        $xmlWriter->openMemory();
        $atomEntry->writeXml($xmlWriter);

        return $xmlWriter->outputMemory();
    }
protected function wrapAtomEntry($entity, array $links = null)
    {
        Validate::notNull($entity, 'entity');

        $content = new Content();
        $content->setType(Resources::XML_CONTENT_TYPE);
        $content->setText(ContentPropertiesSerializer::serialize($entity));

        $atomEntry = new Entry();
        $atomEntry->setContent($content);

        if ($links) {
            $atomEntry->setLink($links);
        }

        $xmlWriter = new \XMLWriter();
        $xmlWriter->openMemory();
        $atomEntry->writeXml($xmlWriter);

        return $xmlWriter->outputMemory();
    }
protected function wrapAtomEntry ( $ entity , array $ links = null ) { Validate :: notNull ( $ entity , 'entity' ) ; $ content = new Content ( ) ; $ content -> setType ( Resources :: XML_CONTENT_TYPE ) ; $ content -> setText ( ContentPropertiesSerializer :: serialize ( $ entity ) ) ; $ atomEntry = new Entry ( ) ; $ atomEntry -> setContent ( $ content ) ; if ( $ links ) { $ atomEntry -> setLink ( $ links ) ; } $ xmlWriter = new \ XMLWriter ( ) ; $ xmlWriter -> openMemory ( ) ; $ atomEntry -> writeXml ( $ xmlWriter ) ; return $ xmlWriter -> outputMemory ( ) ; }
Wraps media services entity with Atom entry.

@param object $entity Media services entity
@param array  $links  AtomLinks to other media services entities

@return string XML string representing Atom Entry
Wraps media services entity with Atom entry .