src/AbstractEntity.php
public function packValue(): array
    {
        $result = [];
        foreach ($this->fields as $field => $value) {
            if ($value instanceof AccessorInterface) {
                $result[$field] = $value->packValue();
            } else {
                $result[$field] = $value;
            }
        }

        return $result;
    }
public function packValue(): array
    {
        $result = [];
        foreach ($this->fields as $field => $value) {
            if ($value instanceof AccessorInterface) {
                $result[$field] = $value->packValue();
            } else {
                $result[$field] = $value;
            }
        }

        return $result;
    }
public function packValue ( ) : array { $ result = [ ] ; foreach ( $ this -> fields as $ field => $ value ) { if ( $ value instanceof AccessorInterface ) { $ result [ $ field ] = $ value -> packValue ( ) ; } else { $ result [ $ field ] = $ value ; } } return $ result ; }
Pack entity fields into plain array.

@return array

@throws \Spiral\Models\Exception\AccessException
Pack entity fields into plain array .