Set the value of Type / type
@param $value string
@return Job
13162
public function setType(string $value) : Job
    {

        if ($this->data['type'] !== $value) {
            $this->data['type'] = $value;
            $this->setModified('type');
        }

        return $this;
    }
534473
public function by($type, $value)
    {
        $this->reloadQueryAdapter();
        $this->activeQuery->triggerLookupMode($type, $value);
        return $this;
    }
815073
public function set($value = null) 
    {
        if (is_null($value)) {
            $value = array();
        }
        
        if (!is_array($value)) {
            $value = func_get_args();
        }
        
        $this->__construct($value);
        
        return $this;
    }
212877
public function setValue($value) {

		// special behavior for DateTime
		if (is_a($value, 'DateTime') and is_a($this, 'Pair\FormControlInput')) {

			// if UTC date, set user timezone
			if (defined('UTC_DATE') and UTC_DATE) {
				$app = Application::getInstance();
				$value->setTimezone($app->currentUser->getDateTimeZone());
			}

			// can be datetime or just date
			$format = (isset($this->type) and 'date'==$this->type) ? $this->dateFormat : $this->datetimeFormat;
			$this->value = $value->format($format);

		} else {

			$this->value = $value;

		}

		return $this;

	}
499693
public function setOrderType($value)
    {
        if (!in_array($value, self::orderTypes(), true)) {
            throw new DomainException(sprintf(self::MSG_UNEXPECTED_TYPE, implode(', ', self::orderTypes())));
        }

        return $this->setAttribute('orderType', $value);
    }
549842
public function setValue(string $value = null) : Element
    {
        if ($value && !preg_match("@^(https?|ftp)://@", $value)) {
            $value = "http://$value";
        }
        return parent::setValue($value);
    }
1144948
public function asValue($value)
    {
        $endPoint = &$this->getEndPoint();
        $endPoint['lookupType'] = self::TYPE_VALUE;
        $endPoint['value'] = $value;

        return $this;
    }
276820
public function asValue($value)
        {
            $endPoint =& $this->_getEndPoint();
            $endPoint['lookupType'] = self::TYPE_VALUE;
            $endPoint['value'] = $value;

            return $this;
        }
65422
public function setValue(   $value)
    {
        
     
        // Set the value of the expression and cast it function of the (defined) base type of the variable
        if ($this->attributes['baseType']){
            switch ($this->attributes['baseType']){
                case 'boolean':
                    if (is_string ($value)){
                        $this->value = (bool)($value=='true'||$value=='1'?1:0);
                    }else if (is_bool ($value)){
                        $this->value = $value;
                    }else if ($value == null){
                        $this->value = null;
                    }else{
                        throw new Exception ('taoQTI_models_classes_QTI_response_ExpressionOperator::setValue : an error occured, the value ['.$value.'] is not a well formed boolean');
                    }
                    break;
                case 'float':
                    $this->value = (float)$value;
                    break;
                case 'integer':
                    $this->value = (int)$value;
                    break;
                case 'identifier':
                case 'string':
                    $this->value = (string)$value;
                    break;
                case 'pair':
                    $this->value = taoQTI_models_classes_Matching_VariableFactory::createJSONValueFromQTIData($value, 'pair');
                    break;
                case 'directedPair':
                    $this->value = taoQTI_models_classes_Matching_VariableFactory::createJSONValueFromQTIData($value, 'directedPair');
                    break;
            }   
        }
        
    }
1062257
public function value($value)
    {
        // Set the value using parent, so that if there is already one specified
        // from populate or POST
        parent::value($value);

        // Set the value of the subfields
        $this->date->value($value);
        $this->time->value($value);

        // Chainable
        return $this;
    }
772197
public function setValue($value) {
        switch ($this->type) {
            case self::TYPE_BOOLEAN:
                $this->value = (bool) $value;
                break;
            case self::TYPE_STRING:
                $this->value = (string) $value;
                break;
        }
        return $this;
    }
1164195
public function setValueAttribute($value)
    {
        $type = gettype($value);

        if (is_array($value)) {
            $this->type = 'array';
            $this->attributes['value'] = json_encode($value);
        } elseif ($value instanceof DateTime) {
            $this->type = 'datetime';
            $this->attributes['value'] = $this->fromDateTime($value);
        } elseif ($value instanceof Model) {
            $this->type = 'model';
            $this->attributes['value'] = get_class($value).(!$value->exists ? '' : '#'.$value->getKey());
        } elseif (is_object($value)) {
            $this->type = 'object';
            $this->attributes['value'] = json_encode($value);
        } else {
            $this->type = in_array($type, $this->dataTypes) ? $type : 'string';
            $this->attributes['value'] = $value;
        }
    }
344430
public function setValue($value)
    {
        $cast_method = 'castTo' . ucwords($this->castTo);
        $this->values[] = $this->{$cast_method}($value);
    }
74893
public function setValue($value)
    {
        if (is_array($value)) {
            foreach ($value as $childKey => $childValue) {
                $this->children[$childKey] = new static($childValue);
            }
            $this->value = null;
        } else {
            $this->value = $value;
            $this->children = array();
        }
        return $this;
    }
344427
public function setValue( $value ) {
		$this->value = $this->cleanUpValue( $value );
		// Deselect all options
		foreach ( $this->fields as $field ) {
			$field->getField()->setSelected( false );
		}
		// Select the requested ones
		foreach ( $this->value as $key ) {
			$this->fields[ $key ]->getField()->setSelected( true );
		}
		return $this;
	}
661128
public function set(string $key, $value, int $type = PDO::PARAM_STR)
    {
        $this->params[$key] = $value;
        $this->param_types[$key] = $type;
        return $this;
    }
478870
public function setValue($value)
    {
        $this->_value = $value;
        $this->getInput()->setValue($value);
        return $this;
    }