core/Field.php
private function set(string $name, $value, $p = false)
    {
        if (empty($name)) {
            return;
        }
        if ($p && $this->_ref->hasProperty($name)) {
            $prop = $this->_ref->getProperty($name);
            if ($prop->isPublic()) {
                $prop->setValue($this, $value);
            }
        } else if ($name[0] == 'b' && preg_match('@^box([A-Z].*)$@', $name, $m)) {
            $name = Utils::camelToAttr($m[1]);
            $this->_attr[$name] = $value;
        } else if ($name[0] == 'd' && preg_match('@^data([A-Z].*)$@', $name)) {
            $name = Utils::camelToAttr($name);
            $this->_data[$name] = $value;
        } else if ($name[0] == 'v' && preg_match('@^view([A-Z].*)$@', $name)) {
            $this->_view[$name] = $value;
        } else if ($name == 'value') {
            $this->_value = $value;
        } else {
            $this->_extends[$name] = $value;
        }
    }
private function set(string $name, $value, $p = false)
    {
        if (empty($name)) {
            return;
        }
        if ($p && $this->_ref->hasProperty($name)) {
            $prop = $this->_ref->getProperty($name);
            if ($prop->isPublic()) {
                $prop->setValue($this, $value);
            }
        } else if ($name[0] == 'b' && preg_match('@^box([A-Z].*)$@', $name, $m)) {
            $name = Utils::camelToAttr($m[1]);
            $this->_attr[$name] = $value;
        } else if ($name[0] == 'd' && preg_match('@^data([A-Z].*)$@', $name)) {
            $name = Utils::camelToAttr($name);
            $this->_data[$name] = $value;
        } else if ($name[0] == 'v' && preg_match('@^view([A-Z].*)$@', $name)) {
            $this->_view[$name] = $value;
        } else if ($name == 'value') {
            $this->_value = $value;
        } else {
            $this->_extends[$name] = $value;
        }
    }
设置属性值
@param string $name
@param $value
@param bool $p 包括原有属性