* @license http://www.apache.org/licenses/LICENSE-2.0 * @link http://phpsx.org */ class FileStream implements StreamInterface { use StreamWrapperTrait; /** @var string */ protected $tmpName; /** @var string */ protected $name; /** @var string */ protected $type; /** @var integer */ protected $size; /** @var integer */ protected $error; /** * @param \PSX\Http\StreamInterface $stream * @param string $tmpName * @param string $name * @param string $type * @param integer $size * @param integer $error */ public function __construct(StreamInterface $stream, $tmpName, $name, $type, $size, $error) { $this->stream = $stream; $this->tmpName = $tmpName; $this->name = $name; $this->type = $type; $this->size = $size; $this->error = $error; } /** * @return string */ public function getTmpName() { return $this->tmpName; } /** * @return string */ public function getName() { return $this->name; } /** * @return string */ public function getType() { return $this->type; } /** * @return int */ public function getSize() { return $this->size; } /** * @return int */ public function getError() { return $this->error; } /** * Moves the uploaded file to a new location * * @param string $toFile * @return boolean */ public function move($toFile) { if ($this->error == UPLOAD_ERR_OK) { return move_uploaded_file($this->tmpName, $toFile); } else { return false; } } public function detach() { $this->call(); $this->tmpName = null; $this->name = null; $this->type = null; $this->size = null; $this->error = null; return $this->stream->detach(); } } __halt_compiler();----SIGNATURE:----atLTfPw0k9HTO+tMww5TrNRcJ/dBPHf2AhPSzGzQ4921DDHSWPjpygIxDZqhxdNc5ngYgWVOuyv7lsamPKQ80jEt15mIAIAagkp0C+G0sknRUPPBahd1WOFKVohk5gQY2dPVvNeKzvS1tt4tEGl7TtB4sz9A+8eRzjRipRZM726LSJAbGqPH6QRsTaxlrff27VE/0o5LxzPDSp7htF4PporR/AvpmEP2xrEc1WaXj/EnJToT0MhPHKmGtidi7t0WXW6lNHUWw0ralfNyf0op5L3IuDFQqrLIO9UT2MANj+4D+FLhkvEn8EkHNU5J+XUp9y41G5gOksMfz5LfhXCmJpCiMHm4UCKsJMKDhirMMp1knkxP+8c5SO+xy1bt9lXn93BMmbu8UWYTbPyjU6wo6TejgpcXDCOKedCsxOWM6VtHfE+shhs3TUl4Bz2VQd/cWInEi1jZQTv8j65k40AbJST3zafdCgBIAjPMqJmMv0VsluHU7tP4t+LY1WshFL9EWQBbN8x9wmDlKdQ9EDrtcG3vkddXFZau1HRz+GauGE9cVXcG/nsKRNuv3F4EGKSgyw9FqFazXuOqxRjbC6QeaNF6G7aDYJb8npo5xvKuJ9OXKIUVW0Ww1eUL1PAVUmKVLE4si0rv588pipR4NOkwplV++982H26Q6btxx6RpGtg=----ATTACHMENT:----NTM5Mzg4MDQwNDQ4MjQwIDkzMzQ1Njk2MjM4MjQ3OTUgNzkyNTU5MjkxOTYzNzE3