* @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:----I4IqysdsJk1fmWiBFvzua3t+/wRaU/c1bfChprKVLmvO2ycrFv+OAYh3uNEcCMgJ2GDjc0QYyZTMdF1UkRHfq/ahCCCCnlhdhn18viqaqfnkf4gsq0zgHfdYE5pKtdkC8W3NGENglPX170Zg1Hvt/eEp/L8AT+qUcVvAKzY37q4bE81fILinlfpIkipauLs72aa70VQd8WclUXlW9or8/0JF4LPHJ/N+nqQas7j4id1aMLui2wKOJsSq6HnXi0YuTvxaR+PG1f9WYDnOFJe7sA421MYxJK2vCs1mD2QaZjpUZ03TNWtvm1lq7cj+kyQPKQFaj/C47XylNG5i1g11WqhN61g+htyH2GKldeiNpdK7Tr/0n7eo03vgssN2klhmDjq6oHsNRmjH1otOcLAnL7TJ4HufEhI9rCid05troGrVVHIR0VPm0E1XnZm8MIZv/Gi/UeExzkb3Ns2xcq1PDNP08R45iP1Z+talZU1pu5hk4MnXp30qJ1C0fekrljwAc47DLKrrTUv+Hr1XTDkeADsCTPjJaCV0rgxeeCRwP0KPm8CPuqsbROiH98w3ficBohUQW2auyuWdwxM4c6+ZfQbDY1Ua5tSYGCI/sPJcq90Tp3yEUZ5HbkfJBOFEOv9lcnT/EuVFe+x/EHFPG0NezLD9hwKm0BQNDCPfTnCsQGU=----ATTACHMENT:----MzE4MTMwNDc1ODU0NjQyNCAzNjMxNzI4OTIxNjM3MzMgODAyOTc5NDkyODE3Mjc3OA==