src/MediaServices/MediaServicesRestProxy.php
private function _createEntity($entity, $path, array $links = null)
    {
        $method = Resources::HTTP_POST;
        $headers = [];
        $postParams = [];
        $queryParams = [];
        $statusCode = Resources::STATUS_CREATED;
        $body = $this->wrapAtomEntry($entity, $links);

        $response = $this->sendHttp(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            $statusCode,
            $body
        );

        $entry = new Entry();
        $entry->parseXml($response->getBody());

        return $this->getPropertiesFromAtomEntry($entry);
    }
private function _createEntity($entity, $path, array $links = null)
    {
        $method = Resources::HTTP_POST;
        $headers = [];
        $postParams = [];
        $queryParams = [];
        $statusCode = Resources::STATUS_CREATED;
        $body = $this->wrapAtomEntry($entity, $links);

        $response = $this->sendHttp(
            $method,
            $headers,
            $queryParams,
            $postParams,
            $path,
            $statusCode,
            $body
        );

        $entry = new Entry();
        $entry->parseXml($response->getBody());

        return $this->getPropertiesFromAtomEntry($entry);
    }
private function _createEntity ( $ entity , $ path , array $ links = null ) { $ method = Resources :: HTTP_POST ; $ headers = [ ] ; $ postParams = [ ] ; $ queryParams = [ ] ; $ statusCode = Resources :: STATUS_CREATED ; $ body = $ this -> wrapAtomEntry ( $ entity , $ links ) ; $ response = $ this -> sendHttp ( $ method , $ headers , $ queryParams , $ postParams , $ path , $ statusCode , $ body ) ; $ entry = new Entry ( ) ; $ entry -> parseXml ( $ response -> getBody ( ) ) ; return $ this -> getPropertiesFromAtomEntry ( $ entry ) ; }
Create entity.

@param object $entity Entity data
@param string $path   REST path
@param array  $links  AtomLinks to other media services entities

@return array Created entity data
Create entity .