Set Build - Accepts an ID, an array representing a Build or a Build model.

@param $value mixed
480063
public function setBuild($value)
    {
        // Is this an instance of Build?
        if ($value instanceof \PHPCI\Model\Build) {
            return $this->setBuildObject($value);
        }

        // Is this an array representing a Build item?
        if (is_array($value) && !empty($value['id'])) {
            return $this->setBuildId($value['id']);
        }

        // Is this a scalar value representing the ID of this foreign key?
        return $this->setBuildId($value);
    }
1155904
public function set_value($value) {

        // Getting the filemanager label from the DOM.
        $fieldlabel = $this->get_field_locator();

        // Getting the filepicker context and using the step definition
        // to upload the requested file.
        $uploadcontext = behat_context_helper::get('behat_repository_upload');
        $uploadcontext->i_upload_file_to_filemanager($value, $fieldlabel);
    }
420856
public final function setValue($value) {
		$this->assetConstraints($value);

		$this->value = $value;
		$this->valueLoaded = true;
	}
531497
public function setId(int $value) : Job
    {

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

        return $this;
    }
1240105
public function setMetaKey($value)
    {
        $this->_validateNotNull('MetaKey', $value);
        $this->_validateString('MetaKey', $value);

        if ($this->data['meta_key'] === $value) {
            return;
        }

        $this->data['meta_key'] = $value;

        $this->_setModified('meta_key');
    }
505566
public function setId(int $value) : Log
    {

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

        return $this;
    }
344430
public function setValue($value)
    {
        $cast_method = 'castTo' . ucwords($this->castTo);
        $this->values[] = $this->{$cast_method}($value);
    }
30310
public function setProject($value)
    {
        // Is this an instance of Project?
        if ($value instanceof \PHPCI\Model\Project) {
            return $this->setProjectObject($value);
        }

        // Is this an array representing a Project item?
        if (is_array($value) && !empty($value['id'])) {
            return $this->setProjectId($value['id']);
        }

        // Is this a scalar value representing the ID of this foreign key?
        return $this->setProjectId($value);
    }
1325154
function setAction( $value, $params=FALSE ) {
    $this->action['value']  = $value;
    $this->action['params'] = $this->_setParams( $params );
  }
520794
protected function set($name, $value)
    {
        if ($this->modified === null && $this->uid !== null) {
            $this->load();
        }

        $value = $this->validate($name, $value);

        if ($this->properties[$name]['value'] !== $value) {
            $this->properties[$name]['value'] = $value;
            $this->modified = true;
        }

        return $this;
    }
612170
public function setSshPublicKey($value)
    {
        $this->_validateString('SshPublicKey', $value);

        if ($this->data['ssh_public_key'] === $value) {
            return;
        }

        $this->data['ssh_public_key'] = $value;

        $this->_setModified('ssh_public_key');
    }
91630
public function setParams($value)
    {
        if (!is_array($value)) {
            return $this;
        }

        foreach ($value as $identifier => $param) {
            $this->setParam($identifier, $param);
        }

        return $this;
    }
880422
public function setValue($value)
    {
        if (is_array($value)) {
            $value = implode(', ', $value);
        }

        if (!is_null($value)) {
            $this->_value = $value;
            $this->appendChild($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;
    }
1062368
public function setCreated($value)
    {
        $this->_validateDate('Created', $value);

        if ($this->data['created'] === $value) {
            return;
        }

        $this->data['created'] = $value;

        $this->_setModified('created');
    }
909052
public function setValue($value)
    {
        if (is_array($value)) {
            if (1 === count($value)) {
                $this->value = $value[0];
            } else {
                throw new \InvalidArgumentException('The argument must either be a string or an array with only one child');
            }
        } else {
            $this->value = $value;
        }
    }
958977
public function setValue($value)
    {
        $this->item->set($this->field->getColName(), $this->field->mmAttribute->widgetToValue($value, null));
    }