改名
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
* Time: 14:39
|
||||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Database\Base;
|
||||
|
||||
|
||||
@@ -664,7 +665,7 @@ abstract class BaseActiveRecord extends Component implements IOrm, \ArrayAccess
|
||||
}
|
||||
|
||||
if (isset($this->_attributes[$name]) || array_key_exists($name, $this->_attributes)) {
|
||||
return stripcslashes($this->_attributes[$name]);
|
||||
return static::getColumns()->_decode($name, $this->_attributes[$name]);
|
||||
}
|
||||
|
||||
if (isset($this->_relate[$name])) {
|
||||
|
||||
@@ -122,6 +122,19 @@ class Columns extends Component
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $name
|
||||
* @param $value
|
||||
* @return float|int|mixed|string
|
||||
* @throws Exception
|
||||
*/
|
||||
public function _decode(string $name, $value)
|
||||
{
|
||||
return $this->decode($value, $this->get_fields($name));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param $val
|
||||
* @param $format
|
||||
|
||||
Reference in New Issue
Block a user