src/MediaServices/Models/ChannelEncoding.php
public function fromArray($options)
    {
        if (isset($options['AdMarkerSource'])) {
            Validate::isString($options['AdMarkerSource'], 'options[AdMarkerSource]');
            $this->_adMarkerSource = $options['AdMarkerSource'];
        }

        if (isset($options['IgnoreCea708ClosedCaptions'])) {
            Validate::isString($options['IgnoreCea708ClosedCaptions'], 'options[IgnoreCea708ClosedCaptions]');
            $this->_ignoreCea708ClosedCaptions = (bool) $options['IgnoreCea708ClosedCaptions'];
        }

        if (!empty($options['VideoStreams'])) {
            Validate::isArray($options['VideoStreams'], 'options[VideoStreams]');
            foreach ($options['VideoStreams'] as $videoStream) {
                $this->_videoStreams[] = VideoStream::createFromOptions($videoStream);
            }
        }

        if (!empty($options['AudioStreams'])) {
            Validate::isArray($options['AudioStreams'], 'options[AudioStreams]');
            foreach ($options['AudioStreams'] as $audioStream) {
                $this->_audioStreams[] = AudioStream::createFromOptions($audioStream);
            }
        }

        if (isset($options['SystemPreset'])) {
            Validate::isString($options['SystemPreset'], 'options[SystemPreset]');
            $this->_systemPreset = $options['SystemPreset'];
        }
    }
public function fromArray($options)
    {
        if (isset($options['AdMarkerSource'])) {
            Validate::isString($options['AdMarkerSource'], 'options[AdMarkerSource]');
            $this->_adMarkerSource = $options['AdMarkerSource'];
        }

        if (isset($options['IgnoreCea708ClosedCaptions'])) {
            Validate::isString($options['IgnoreCea708ClosedCaptions'], 'options[IgnoreCea708ClosedCaptions]');
            $this->_ignoreCea708ClosedCaptions = (bool) $options['IgnoreCea708ClosedCaptions'];
        }

        if (!empty($options['VideoStreams'])) {
            Validate::isArray($options['VideoStreams'], 'options[VideoStreams]');
            foreach ($options['VideoStreams'] as $videoStream) {
                $this->_videoStreams[] = VideoStream::createFromOptions($videoStream);
            }
        }

        if (!empty($options['AudioStreams'])) {
            Validate::isArray($options['AudioStreams'], 'options[AudioStreams]');
            foreach ($options['AudioStreams'] as $audioStream) {
                $this->_audioStreams[] = AudioStream::createFromOptions($audioStream);
            }
        }

        if (isset($options['SystemPreset'])) {
            Validate::isString($options['SystemPreset'], 'options[SystemPreset]');
            $this->_systemPreset = $options['SystemPreset'];
        }
    }
public function fromArray ( $ options ) { if ( isset ( $ options [ 'AdMarkerSource' ] ) ) { Validate :: isString ( $ options [ 'AdMarkerSource' ] , 'options[AdMarkerSource]' ) ; $ this -> _adMarkerSource = $ options [ 'AdMarkerSource' ] ; } if ( isset ( $ options [ 'IgnoreCea708ClosedCaptions' ] ) ) { Validate :: isString ( $ options [ 'IgnoreCea708ClosedCaptions' ] , 'options[IgnoreCea708ClosedCaptions]' ) ; $ this -> _ignoreCea708ClosedCaptions = ( bool ) $ options [ 'IgnoreCea708ClosedCaptions' ] ; } if ( ! empty ( $ options [ 'VideoStreams' ] ) ) { Validate :: isArray ( $ options [ 'VideoStreams' ] , 'options[VideoStreams]' ) ; foreach ( $ options [ 'VideoStreams' ] as $ videoStream ) { $ this -> _videoStreams [ ] = VideoStream :: createFromOptions ( $ videoStream ) ; } } if ( ! empty ( $ options [ 'AudioStreams' ] ) ) { Validate :: isArray ( $ options [ 'AudioStreams' ] , 'options[AudioStreams]' ) ; foreach ( $ options [ 'AudioStreams' ] as $ audioStream ) { $ this -> _audioStreams [ ] = AudioStream :: createFromOptions ( $ audioStream ) ; } } if ( isset ( $ options [ 'SystemPreset' ] ) ) { Validate :: isString ( $ options [ 'SystemPreset' ] , 'options[SystemPreset]' ) ; $ this -> _systemPreset = $ options [ 'SystemPreset' ] ; } }
Fill Encoding from array.

@param array $options Array containing values for object properties
Fill Encoding from array .