public function asArray()
    {
        $fields = [
            '@type' => $this->type(),
            '@key'  => $this->key(),
        ];

        foreach ($this->fields as $name => $field) {
            $fields[$name] = $field->value;
        }

        return $fields;
    }
public function asArray()
    {
        $fields = [
            '@type' => $this->type(),
            '@key'  => $this->key(),
        ];

        foreach ($this->fields as $name => $field) {
            $fields[$name] = $field->value;
        }

        return $fields;
    }
public function asArray ( ) { $ fields = [ '@type' => $ this -> type ( ) , '@key' => $ this -> key ( ) , ] ; foreach ( $ this -> fields as $ name => $ field ) { $ fields [ $ name ] = $ field -> value ; } return $ fields ; }
Get the field values

@return  array  The field values, indexed by field name
Get the field values