Fill ChannelPreview from array.

@param array $options Array containing values for object properties
426649
public function fromArray($options)
    {
        if (!empty($options['AccessControl'])) {
            Validate::isArray($options['AccessControl'], 'options[AccessControl]');
            $this->_accessControl = ChannelPreviewAccessControl::createFromOptions($options['AccessControl']);
        }

        if (!empty($options['Endpoints'])) {
            Validate::isArray($options['Endpoints'], 'options[Endpoints]');
            foreach ($options['Endpoints'] as $endpoint) {
                $this->_endpoints[] = ChannelEndpoint::createFromOptions($endpoint);
            }
        }
    }
1356180
public function addOptions(array $options) : Select
    {
        foreach ($options as $value => $content) {
            $this->addOption($content, $value);
        }

        return $this;
    }
1202661
public function load_options( string $options )
    {
        // get constants
        $reflect = new \ReflectionClass( $options );
        $options = $reflect->getConstants();

        // iterate needed params
        foreach ( $options as $option => $default ) {
            $key = strtolower( $option ); //
            $env = getenv( $option );
            $this->options[ $key ] = get_option( $key, $default );
            // overload env variables
            $this->options[ $key ] = ! $env ? $this->options[ $key ] : $env;
        }
    }
490784
public function setOptions(array $options)
    {
        $this->validateOptions($options, $this->type);

        $this->options = $options;

        return $this;
    }
733386
public function fromArray($options)
    {
        if (isset($options['Name'])) {
            Validate::isString($options['Name'], 'options[Name]');
            $this->_name = $options['Name'];
        }

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

        if (isset($options['SubnetPrefixLength'])) {
            Validate::isString($options['SubnetPrefixLength'], 'options[SubnetPrefixLength]');
            $this->_subnetPrefixLength = $options['SubnetPrefixLength'];
        }
    }
25390
public function set_option($options = array()) {
        if (!empty($options['apikey'])) {
            set_config('apikey', trim($options['apikey']), 'youtube');
        }
        unset($options['apikey']);
        return parent::set_option($options);
    }
858140
public function importFromArray(array $options)
    {
        foreach ($options as $key => $value) {
            switch (true) {
                case $key === 'args':
                    $this->args = $value;
                    break;
                case is_integer($key):
                    $this->args[] = $value;
                    break;
                default:
                    $this->options[$key] = $value;
                    break;
            }
        }
    }
820229
public function fromArray($options)
    {
        if (isset($options['Id'])) {
            Validate::isString($options['Id'], 'options[Id]');
            $this->_id = $options['Id'];
        }

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

        if (isset($options['AssetDeliveryProtocol'])) {
            Validate::isInteger($options['AssetDeliveryProtocol'], 'options[AssetDeliveryProtocol]');
            $this->_protocol = $options['AssetDeliveryProtocol'];
        }

        if (isset($options['AssetDeliveryPolicyType'])) {
            Validate::isInteger($options['AssetDeliveryPolicyType'], 'options[AssetDeliveryPolicyType]');
            $this->_policyType = $options['AssetDeliveryPolicyType'];
        }

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

        if (isset($options['Created'])) {
            Validate::isDateString($options['Created'], 'options[Created]');
            $this->_created = new \DateTime($options['Created']);
        }

        if (isset($options['LastModified'])) {
            Validate::isDateString(
                $options['LastModified'],
                'options[LastModified]'
            );
            $this->_lastModified = new \DateTime($options['LastModified']);
        }
    }
1362786
public function optionsByArray($options) {
		if ($options) {
			$this->options = array_merge($this->options, $options);
		}

		return $this;
	}
1130657
public function fromArray(array $options)
    {
        if (isset($options['Id'])) {
            Validate::isString($options['Id'], 'options[Id]');
            $this->_id = $options['Id'];
        }

        if (isset($options['Created'])) {
            Validate::isDateString($options['Created'], 'options[Created]');
            $this->_created = new \DateTime($options['Created']);
        }

        if (isset($options['LastModified'])) {
            Validate::isDateString(
                $options['LastModified'],
                'options[LastModified]'
            );
            $this->_lastModified = new \DateTime($options['LastModified']);
        }

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

        if (isset($options['DurationInMinutes'])) {
            Validate::isDouble(
                $options['DurationInMinutes'],
                'options[DurationInMinutes]'
            );
            $this->_durationInMinutes = $options['DurationInMinutes'];
        }

        if (isset($options['Permissions'])) {
            Validate::isInteger(
                $options['Permissions'],
                'options[Permissions]'
            );
            $this->_permissions = $options['Permissions'];
        }
    }
975098
public function fromArray($options)
    {
        if (isset($options['InsertSlateOnAdMarker'])) {
            Validate::isBoolean($options['InsertSlateOnAdMarker'], 'options[InsertSlateOnAdMarker]');
            $this->_insertSlateOnAdMarker = (bool) $options['InsertSlateOnAdMarker'];
        }

        if (isset($options['DefaultSlateAssetId'])) {
            Validate::isString($options['DefaultSlateAssetId'], 'options[DefaultSlateAssetIdUrl]');
            $this->_defaultSlateAssetId = $options['DefaultSlateAssetId'];
        }
    }
1335656
public function setOptions($options)
    {
        parent::setOptions($options);
    
        if (isset($options['fetch_url'])) {
            $this->setFetchUrl($options['fetch_url']);
        }
        
        if (isset($options['preview_url'])) {
            $this->setPreviewUrl($options['preview_url']);
        }
        
        return $this;
    }
940849
public function createOptions(Array $options) {

		$this->options = [];

		foreach($options as $value => $label) {
			$this->appendOption(new RadioOptionElement($value, new LabelElement($label)));
		}
		
		return $this;

	}
712954
public static function init($options = array())
    {

        $defaults = array(
            'mode'=>'default'
        );

        $options = array_merge($defaults, $options);

        self::$prob_start = self::loadModel(dirname(dirname(__FILE__)).'/model/prob_start.json');
        self::$prob_trans = self::loadModel(dirname(dirname(__FILE__)).'/model/prob_trans.json');
        self::$prob_emit = self::loadModel(dirname(dirname(__FILE__)).'/model/prob_emit.json');

    }
941616
public function channelFollows($channel, $options = [])
    {
        $availableOptions = ['limit', 'offset', 'direction'];

        return $this->sendRequest('GET', 'channels/'.$channel.'/follows', false, $options, $availableOptions);
    }
1060574
public function setOptions(array $options)
    {
        foreach ($options as $k => $v) {
            $this->smarty->$k = $v;
        }
    }
1032703
public function setOptionFromArray($options) {
        foreach($options as $option => $value) {
            $this->setOption($option, $value);
        }

        return $this;
    }