Exemple #1
0
 /**
  * Constructor
  * @param Messages $messages
  * @param string $file
  * @param string|null $clientFilename
  * @param string|null $clientMediaType
  * @param int|null $size
  * @param int $error
  */
 public function __construct($messages, $file, $clientFilename = null, $clientMediaType = null, $size = null, $error = UPLOAD_ERR_OK)
 {
     parent::__construct($messages);
     $this->file = $file;
     $this->clientFilename = $clientFilename;
     $this->clientMediaType = $clientMediaType;
     $this->size = $size;
     $this->error = $error;
 }
Exemple #2
0
 /**
  * Construct
  * @param Messages $messages
  * @param array $fileData
  */
 public function __construct($messages, $fileData)
 {
     parent::__construct($messages);
     $this->clientFilename = $fileData['name'];
     $this->clientMediaType = $fileData['type'];
     $this->file = $fileData['tmp_name'];
     $this->error = $fileData['error'];
     $this->size = $fileData['size'];
 }