Sets an object attribute to a value.

@param string $name  The name of the object attribute
@param mixed  $value The value of the object attribute
176694
protected function setAttribute(string $name, $value) : void
    {
        // Convert values
        switch ($name) {
            case 'name':
                // no break here
            case 'value':
                $value = (string) $value;
                break;
            case 'prefixed':
                $value = (boolean) $value;
                break;
        }

        $this->$name = $value;
    }
346352
public static function set(&$object, $name, $value)
    {
        $names = explode('.', $name);
        $lastName = array_pop($names);
        $data = &$object;
        foreach ($names as $nameItem)
        {
            if(is_array($data))
            {
                if (!isset($data[$nameItem]))
                {
                    $data[$nameItem] = [];
                }
                $data = &$data[$nameItem];
            }
            else if(is_object($data))
            {
                if (!isset($data->$nameItem))
                {
                    $data->$nameItem = new stdClass;
                }
                $data = &$data->$nameItem;
            }
        }
        if(is_array($data))
        {
            $data[$lastName] = $value;
        }
        else if(is_object($data))
        {
            $data->$lastName = $value;
        }
    }
961670
public function writeAttribute($name, $value) {
        $method = 'set' . ucfirst($name);
        if(method_exists($this, $method)) {
            $this->$method($value);
        } else {
            parent::writeAttribute($name, $value);
        }
    }
1304984
public function set($name, $value)
    {
        if (is_array($value)) {
            $value = new KObjectConfig($value);
        }

        parent::set($name, $value);
    }
640904
public function set($name, $value) {
        $setting = &$this->settings;
        $names   = explode('.', $name);
        $lname   = array_pop($names);
        if ($names) {
            foreach ($names as $n) {
                if (!isset($setting[ $n ])) {
                    $setting[ $n ] = [];
                }
                $setting = &$setting[ $n ];
            }
        }
        $setting[ $lname ] = $value;
    }
420711
protected function setInaccessibleProperty($object, $name, $value)
    {
        $property = $this->getProperty($object, $name);
        $property->setAccessible(true);
        $property->setValue(is_object($object) ? $object : null, $value);
    }
1073
public function set($name, $value = null)
    {
        if (is_array($name)) {
            $this->parameters = array_replace($this->parameters, $name);
        } else {
            $this->parameters[trim(strtolower($name))] = is_string($value) ? trim($value) : $value;
        }
    }
875690
public function set(string $name, string $value)
    {
        $this->values[$name] = $value;
        return $this;
    }
460672
public function setm($name, $value) {
        if (is_array($value)) {
            $ov    = $this->geta($name);
            $value = array_merge($value, $ov);
        }
        $this->set($name, $value);
    }
589594
public function setValue($name, $value = '')
    {
        if (\is_array($name)) {
            foreach ($name as $key => $val) {
                if (isset($this->$key)) {
                    $this->$key = $val;
                }
            }
        } else {
            if (isset($this->$name)) {
                $this->$name = $value;
            }
        }
    }
511080
public static function set($name, $value = null)
	{
		$names = parseCfgName($name);
		if (isset($names[0]))
		{
			$first = array_shift($names);
			$obj = self::getInstance($first);
			if ($obj)
			{
				return $obj->setVal($names, $value);
			}
			else
			{
				return false;
			}
		}
		else
		{
			return false;
		}
	}
712815
public function set_attribute($name, $value){
		if (method_exists($this->child, 'set_attribute')) {
			LogMaster::log("setting attribute: \nname = {$name}\nvalue = {$value}");
			$this->child->set_attribute($name, $value);
		} else {
			LogMaster::log("set_attribute method doesn't exists");
		}
	}
684628
private function set(string $name, $value):void{
		$method = 'magic_set_'.$name;

		if(\method_exists($this, $method)){
			$this->$method($value);
		}

	}
716024
public function set($name, $value)
    {
        $name = $this->normalizeName($name);
        $newValues = is_array($value) ? $value : [$value];
        $this->data[$name] = $newValues;
    }
133566
public function setAttrData(string $name, ?string $value): void
  {
    $this->attributes['data-'.$name] = $value;
  }
552238
public function set($name, $value) {
		$this->vars[$name] = is_object($value) ? (method_exists($value, 'fetch') ? $value->fetch() : $value) : $value;
	}
1212765
protected function setObjectProperty($object, $name, $value)
    {
        if (ClassInfo::hasMethod($object, 'set' . $name)) {
            $object->{'set' . $name}($value);
        } else {
            $object->$name = $value;
        }
    }