src/Type.php
public function &serialize(...$fields)
    {
        if (!empty($fields)) {
            $this->serialize = array_unique(array_merge($this->serialize, $fields));
        }

        return $this;
    }
public function &serialize(...$fields)
    {
        if (!empty($fields)) {
            $this->serialize = array_unique(array_merge($this->serialize, $fields));
        }

        return $this;
    }
public function & serialize ( ... $ fields ) { if ( ! empty ( $ fields ) ) { $ this -> serialize = array_unique ( array_merge ( $ this -> serialize , $ fields ) ) ; } return $ this ; }
Set a list of fields that will be included during object serialization.

@param  string[] $fields
@return $this
Set a list of fields that will be included during object serialization .