public function create($roomSid, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'RoomSid' => $roomSid,
            'VideoLayout' => Serialize::jsonObject($options['videoLayout']),
            'AudioSources' => Serialize::map($options['audioSources'], function($e) { return $e; }),
            'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function($e) { return $e; }),
            'Resolution' => $options['resolution'],
            'Format' => $options['format'],
            'StatusCallback' => $options['statusCallback'],
            'StatusCallbackMethod' => $options['statusCallbackMethod'],
            'Trim' => Serialize::booleanToString($options['trim']),
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new CompositionInstance($this->version, $payload);
    }
public function create($roomSid, $options = array()) {
        $options = new Values($options);

        $data = Values::of(array(
            'RoomSid' => $roomSid,
            'VideoLayout' => Serialize::jsonObject($options['videoLayout']),
            'AudioSources' => Serialize::map($options['audioSources'], function($e) { return $e; }),
            'AudioSourcesExcluded' => Serialize::map($options['audioSourcesExcluded'], function($e) { return $e; }),
            'Resolution' => $options['resolution'],
            'Format' => $options['format'],
            'StatusCallback' => $options['statusCallback'],
            'StatusCallbackMethod' => $options['statusCallbackMethod'],
            'Trim' => Serialize::booleanToString($options['trim']),
        ));

        $payload = $this->version->create(
            'POST',
            $this->uri,
            array(),
            $data
        );

        return new CompositionInstance($this->version, $payload);
    }
public function create ( $ roomSid , $ options = array ( ) ) { $ options = new Values ( $ options ) ; $ data = Values :: of ( array ( 'RoomSid' => $ roomSid , 'VideoLayout' => Serialize :: jsonObject ( $ options [ 'videoLayout' ] ) , 'AudioSources' => Serialize :: map ( $ options [ 'audioSources' ] , function ( $ e ) { return $ e ; } ) , 'AudioSourcesExcluded' => Serialize :: map ( $ options [ 'audioSourcesExcluded' ] , function ( $ e ) { return $ e ; } ) , 'Resolution' => $ options [ 'resolution' ] , 'Format' => $ options [ 'format' ] , 'StatusCallback' => $ options [ 'statusCallback' ] , 'StatusCallbackMethod' => $ options [ 'statusCallbackMethod' ] , 'Trim' => Serialize :: booleanToString ( $ options [ 'trim' ] ) , ) ) ; $ payload = $ this -> version -> create ( 'POST' , $ this -> uri , array ( ) , $ data ) ; return new CompositionInstance ( $ this -> version , $ payload ) ; }
Create a new CompositionInstance

@param string $roomSid Twilio Room SID.
@param array|Options $options Optional Arguments
@return CompositionInstance Newly created CompositionInstance
@throws TwilioException When an HTTP error occurs.
Create a new CompositionInstance