src/ValidationTrait.php
protected function collectSafeValue(string $field, $value)
    {
        // 进行的是子级属性检查 eg: 'goods.apple'
        if ($pos = \strpos($field, '.')) {
            $field = (string)\substr($field, 0, $pos);
            $value = $this->getRaw($field, []);
        }

        // set
        $this->_safeData[$field] = $value;
    }
protected function collectSafeValue(string $field, $value)
    {
        // 进行的是子级属性检查 eg: 'goods.apple'
        if ($pos = \strpos($field, '.')) {
            $field = (string)\substr($field, 0, $pos);
            $value = $this->getRaw($field, []);
        }

        // set
        $this->_safeData[$field] = $value;
    }
protected function collectSafeValue ( string $ field , $ value ) { // 进行的是子级属性检查 eg: 'goods.apple' if ( $ pos = \ strpos ( $ field , '.' ) ) { $ field = ( string ) \ substr ( $ field , 0 , $ pos ) ; $ value = $ this -> getRaw ( $ field , [ ] ) ; } // set $ this -> _safeData [ $ field ] = $ value ; }
collect Safe Value
@param string $field
@param mixed  $value
collect Safe Value