Format::to_serialized PHP Method

to_serialized() public method

Encode data as a serialized array
public to_serialized ( mixed | null $data = NULL ) : string
$data mixed | null Optional data to pass, so as to override the data passed to the constructor
return string Serialized data
    public function to_serialized($data = NULL)
    {
        // If no data is passed as a parameter, then use the data passed
        // via the constructor
        if ($data === NULL && func_num_args() === 0) {
            $data = $this->_data;
        }
        return serialize($data);
    }