设置值

@param array|object $object
@param string $name
@param mixed $value
@return void
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;
        }
    }
737415
public function setAttribute($name, $value)
	{
		$this->model->$name = $value;
		if (!in_array($name, $this->changedAttributes)) {
			$this->changedAttributes[] = $name;
		}
	}
1207732
public function set( $name, $value )
	{
		$parts = explode( '/', trim( $name, '/' ) );
		$this->_config = $this->_set( $this->_config, $parts, $value );
	}
107807
public function set(string $name, $value = null) : void
    {
        Arr::set($this->registry, $name, $value);
    }
165863
public function execute($eventName, $object)
    {
        if (isset($this->events[$eventName]) && is_array(($this->events[$eventName]))) {
            foreach ($this->events[$eventName] as $method) {
                call_user_func([$object, $method]);
            }
        }
    }
175221
public function setParam($name, $value) {
        $parts = explode('.', $name);
        $currentObject = $this->getParams();
        foreach($parts as $key=>$part) {
            if($key+1==count($parts)) {
                $currentObject->$part = $value;
            } else {
                if (!property_exists($currentObject, $part)) {
                    $currentObject->$part = new stdClass();
                }
                $currentObject = $currentObject->$part;
            }
        }
    }
416858
public function addHeader(string $name, string $value): void
    {
        parent::addHeader($name, $value);
    }
1087577
protected function _object($data, $name)
    {
        
        static $objectIdList = array();
        
        $objectId = spl_object_hash($data);
        if (!isset($objectIdList[$objectId])) {
            $objectIdList[$objectId] = count($objectIdList);
        }
        
        $count      = count(@get_object_vars($data));
        $isExpand   = $count > 0 || self::$_config['dump']['showMethods'];
        $isExpanded = $this->_isExpandedLevel();

        ?>
        <li class="jbchild">
        <div class="jbelement<?php echo $isExpand ? ' jbexpand' : ''; ?> <?= $isExpanded ? 'jbopened' : ''; ?>"
            <?php if ($isExpand) { ?> onClick="jbdump.toggle(this);"<?php } ?>>
            <span class="jbname" title="splHash=<?php echo $objectId;?>"><?php echo $name; ?></span>
            (
                <span class="jbtype jbtype-object"><?php echo get_class($data); ?></span>
                <span style="text-decoration: underline;" title="splHash=<?php echo $objectId;?>">id:<?php echo $objectIdList[$objectId];?></span>,
                l:<?php echo $count; ?>
            )
        </div>
        <?php if ($isExpand) {
        $this->_vars($data, $isExpanded);
    } ?>
    <?php
    }
569457
public function set($name, $value = null)
    {
        $values = is_array($name) ? $name : [$name => $value];
        foreach ($values as $name => $value) {
            $this->itemSetting[$name] = $value;
        }

        unset($this->items[$name]);
    }
1007949
public function set($name, $value)
    {
        if (property_exists($this, $name)) {
            $this->$name = $value;

            return true;
        }

        return null;
    }
1249097
public function set(string $name, $value)
    {
        $this->_data[$name] = $value;

        if(!is_object($value)) {
            $this->_changed[$name] = $value;
        }
    }
1248054
public function set_property( $name, $value ) {
		$property = $this->get_property( $name );

		$property->setValue( $value );

		return $property;
	}
734182
public function assign($name,$value=''){
        if(is_array($name)) {
            $this->tVar   =  array_merge($this->tVar,$name);
        }else {
            $this->tVar[$name] = $value;
        }
    }
99944
public function set($name, $value): void
    {
        if ($this->isFrozen()) {
            throw new FrozenContainerException('Container is frozen');
        }

        if (is_array($value)) {
            $value = new static($value);
        }

        if ($name === null) {
            $this->data[] = $value;
        } else {
            $this->data[$name] = $value;
        }
    }
796291
public function setColumnValue(string $name, $value): void
	{
		$value = $this->cast($name, $value);

		if(method_exists($this, $name . 'Mutator'))
		{
			$this->columns[$name] = $this->{$name . 'Mutator'}($value);
		}
		else
		{
			$this->columns[$name] = $value;
		}
	}
961341
public function set(string $name, $value): void
    {
        $this->loader->setVariable($name, $value);
    }
342494
public function setAttribute(string $name, $value): void
	{
		Arr::set($this->attributes, $name, $value);
	}