gisostallenberg/curlfile-serializer

serialize and unserialize a CURLFile

1.0.0 2017-02-09 15:58 UTC

This package is auto-updated.

Last update: 2024-11-24 05:18:38 UTC


README

Serialize and unserialize a CURLFile

Installation

composer require gisostallenberg/curlfile-serializer

Usage example

<?php

use GisoStallenberg\CURLFileSerializer\CURLFileSerializer;

$curlFileSerializer = CURLFileSerializer::create(new CURLFile('/path/to/file.txt'));
$serialized = serialize($curlFileSerializer);

$curlFileSerializer = unserialize($serialized);
$curlFile = $curlFileSerializer->getCURLFile(); // Is an instanceof CURLFile