Set properties.

@param string $type       type of og:type
@param string $key        variable key
@param array  $attributes inputted opengraph attributes
@param string[]  $validKeys  valid opengraph attributes

@return void
763148
protected function setProperties(
        $type = null,
        $key = null,
        $attributes = [],
        $validKeys = []
    ) {
        if (isset($this->properties['type']) && $this->properties['type'] == $type) {
            foreach ($attributes as $attribute => $value) {
                if (in_array($attribute, $validKeys)) {
                    $this->{$key}[$attribute] = $value;
                }
            }
        }
    }
183282
public function setAttributes( $attributes, $strict = TRUE )
	{
		foreach( $attributes as $key => $value )													//  iterate attributes map
			$this->setAttribute( $key, $value, $strict );											//  set each attribute
	}
1009926
public function setType($type)
    {
        if (strlen($type) == 0) {
            throw new \InvalidArgumentException(sprintf('MIME type should not be empty'));
        }

        if (!preg_match('@^[^/]+/[^/]+$@', $type)) {
            throw new \InvalidArgumentException(sprintf('Invalid MIME type: %s', $type));
        }

        $this->type = $type;

        return $this;
    }
1247409
public void assignType(XAttribute attribute, String type) {
		if (type != null && type.trim().length() > 0) {
			XAttributeLiteral attr = (XAttributeLiteral) ATTR_TYPE.clone();
			attr.setValue(type);
			attribute.getAttributes().put(KEY_TYPE, attr);
		}
	}
128231
public function setType($type)
    {
        if (!array_key_exists($type, self::$Supported)) {
            throw new \InvalidArgumentException(sprintf(
                    'Invalid Sharpen Type "%s"', $type
            ));
        }
        $this->type = $type;
    }
218292
public function setType($type)
    {
        if ($type === null || $type === 'array') {
            $this->type = $type;

            return $this;
        }

        if ($this->isObjectNameValid($type) !== true) {
            throw new InvalidArgumentException('Parameter type is not valid.');
        }

        $this->type = $type;

        return $this;
    }
303035
public function setRealType($type) {
	    if (empty($type)) {
	        return;
        }
        foreach ($this->allowTypes as $key => $item) {
	        if ((!is_array($item) && $item == $type)
                || (is_array($item) && in_array($type, $item))) {
	            $this->realType = $type;
	            return;
            }
        }
	}
1046660
public function setType($key, $type)
    {
        $args = func_get_args();
        $type = array_pop($args);

        if (!($type instanceof Validator))
            $type = new Validator($type);

        if ($this->types->has($args))
        {
            $old_type = $this->types->get($args); 
            if ($old_type != $type)
                throw new \LogicException("Duplicate key: " . WF::str($args));
        }
        else
        {
            $args[] = $type;
            $this->types->set($args, null);
        }
        return $this;
    }
1271842
public function setTypeAttribute($type)
    {
        if (!$type instanceof FileType) {
            $type = FileType::getByName($type);
        }
        if (!$type) {
            throw new InvalidArgumentException('Unknown file type');
        }
        $this->type()->associate($type);
    }
416056
public function set($type, $key, $value, $expire = null)
    {
        self::$store[$key] = [
            'type' => $type,
            'value' => $value,
            'expire' => $expire
        ];
    }
682999
public function fill($attributes)
    {
        // Some context types have varying types
        if ($this->hasGetMutator('type')) {
            $this->type = $this->mutateAttribute('type', $this->getArrValue($attributes, 'type', $this->type));
        }

        // Set properties
        $properties = array_merge([
            '@context' => 'http://schema.org',
            '@type' => $this->type,
            'sameAs' => null
        ], $this->structure, $this->extendStructure);

        // Set properties from attributes
        foreach ($properties as $key => $property) {
            $this->setProperty($key, $property, $this->getArrValue($attributes, $key, ''));
        }

        // After fill event
        $this->afterFill($attributes);
    }
172175
public function setType($type)
    {
        if (!is_string($type)) {
            throw new \InvalidArgumentException('The attribute type on the class Entity has to be string (' . gettype($type) . ('object' === gettype($type) ? ' ' . get_class($type) : '') . ' given).');
        }

        $this->type = $type;

        return $this;
    }
270190
function setTypes($paramtypes) {
        foreach ($paramtypes as $elementname => $paramtype) {
            $this->setType($elementname, $paramtype);
        }
    }
819978
public static function setup($byType, array $attributes)
    {
        if (0 !== preg_match('#^(' . self::$alloweds . '|select|form)$#', $type)) {
            self::$preAttrs[$byType] = $attributes;
        }
    }
1292549
public function setType( $type )
	{
		if ( $type == $this->getType() ) { return; }

		$this->_checkType( $type );

		$this->_values['type'] = (string) $type;
		$this->setModified();
	}
181650
public function setMapTypeIds(array $types)
    {
        $parsed = [];
        foreach ($types as $type) {
            $parsed[] = MapTypeId::getIsValid($type)
                ? new JsExpression($type)
                : $type;
        }

        $this->options['mapTypeIds'] = $parsed;
    }
1353582
protected function validateTypes(array $types)
    {
        foreach ($types as $key => $val) {
            if (!is_string($key)) {
                throw new Exception\InvalidArgumentException(
                    'Keys of $types array must be strings.'
                );
            }
            if (!$val instanceof BlockTypeInterface) {
                throw new Exception\InvalidArgumentException(
                    'Each item of $types array must be BlockTypeInterface.'
                );
            }
        }
    }