批量设置记录值
@param $data mixed 可以是SRow,Array,或主键
@return $this
519206
public function set($data): Record
    {
        //可以以SRow格式或数组格式提供数据
        if ($data instanceof Row) {
            $this->_data = $data->all();
        } elseif (is_array($data)) {
            $this->_data = $data;
        } elseif ($data) {
            $this->loadByPk($data);
        }

        //保存原始数据
        $this->_old = $this->_data;

        //执行读取数据后的钩子
        if ($this->_data) {
            $this->_data = $this->afterLoad($this->_data);
        }

        //将原始值赋值给属性
        if ($data) {
            foreach ($this->_data as $k => $v) {
                $this->$k = $v;
            }
        }
        return $this;
    }
307014
public function setData(array $data)
    {
        $this->data = $this->parseData($data);

        $this->setRules($this->initialRules);

        return $this;
    }
997692
public function bind($data)
    {
        foreach ($this->fields as $name => $field) {
            $value = FormHelper::getByPath($data, $name);

            if ($value !== null) {
                $field->setValue($value);
            }
        }

        return $this;
    }
585487
public function with($data){
      if ($data){
        $tmp = array_merge($data, (isset($this->options['data'])?$this->options['data']:[]));
        $this->options['data'] = $tmp;
      }
      return $this;
    }
727918
public function setValues($data)
    {
        if (!is_array($data)) {
            return $this;
        }

        foreach ($data as $key => $value) {
            $this->$key = $value;
        }
    }
359564
protected function setData($data = [])
    {
        $defaults = [
            'content'  => '',
            'data'     => null,
        ];

        $this->data = array_merge($defaults, $data);

        return $this;
    }
165579
public function initFromArray(array $data) {

        if (!empty($data['message'])) {
            return $this;
        }

        return $this->setTime($data[0])
            ->setLow($data[1])
            ->setHigh($data[2])
            ->setOpen($data[3])
            ->setClose($data[4])
            ->setVolume($data[5]);

    }
387172
public function find($data)
    {
        foreach ($data as $key => $value) {
            if ($this->$key === $value) {
                return $this;
            }
        }
    }
894450
public function setData($data)
    {
        if (!is_array($data) && !is_object($data)) {
            throw new \InvalidArgumentException(sprintf(
                'Expected argument of type array or object, "%s" given',
                is_object($data) ? get_class($data) : gettype($data)
            ));
        }
        $this->data = $data;
        return $this;
    }
889175
public function setData(array $data): self
    {
        assert(count($data) == 2);

        [$allowedEvents, $subscribers] = $data;

        assert($this->checkAllSubscribersAreStatic($subscribers) === true);

        return $this->setAllowedEvents($allowedEvents)->setSubscribers($subscribers);
    }
694610
public function setData($data) 
	{
		if(is_array($data)) {
			$this->data = $data;
		}
		
		$args = func_get_args();
		$this->data[$args[0]] = $args[1];
		
		return $this;
	}
792581
public function initByData($data)
    {
        foreach ($data as $name => $value) {
            $this->set($name, $value);
        }
        $this->initialize();
        return $this;
    }
120468
public function setFromArray(array $data)
    {
        $data = array_intersect_key($data, $this->_data);

        foreach ($data as $columnName => $value) {
            $this->__set($columnName, $value);
        }

        return $this;
    }
525076
public function copyFrom($data)
    {
        if (is_array($data) || $data instanceof \Traversable) {
            if ($this->getCount() > 0) {
                $this->clear();
            }
            if ($data instanceof CMap) {
                $data = $data->_data;
            }
            foreach ($data as $key => $value) {
                $this->add($key, $value);
            }
        } elseif ($data !== null) {
            throw new Exception('实例化列表参数必须是数组或可遍历的对象', 100100601);
        }
    }
967312
public function setData($data) {
        if ($data instanceof \Traversable) {
            $this->data = iterator_to_array($data);
        } else {
            $this->data = $data;
        }

        if (!empty($this->getOrder())) {
            $this->toSort = true;
        }

        return $this;
    }
1216289
public function fromArray($data)
    {
        if (empty($data)) {
            return $this;
        }
        if (isset($data['type']) && $data['type']) {
            $this->setType($data['type']);
        }
        if (isset($data[$this->getType()]) && $data[$this->getType()]) {
            $this->setValue($data[$this->getType()]);
        }
        return $this;
    }
358871
public function setData($data)
    {
        foreach ($data as $name => $value) {
            if ($this->has($name)) {
                $this->get($name)->setValue($value);
            }
        }
        return $this;
    }