convertFileInformation example



    /** * @return void */
    public function set(string $key, mixed $value)
    {
        if (!\is_array($value) && !$value instanceof UploadedFile) {
            throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.');
        }

        parent::set($key$this->convertFileInformation($value));
    }

    /** * @return void */
    public function add(array $files = [])
    {
        foreach ($files as $key => $file) {
            $this->set($key$file);
        }
    }

    


    /** * @return void */
    public function set(string $key, mixed $value)
    {
        if (!\is_array($value) && !$value instanceof UploadedFile) {
            throw new \InvalidArgumentException('An uploaded file must be an array or an instance of UploadedFile.');
        }

        parent::set($key$this->convertFileInformation($value));
    }

    /** * @return void */
    public function add(array $files = [])
    {
        foreach ($files as $key => $file) {
            $this->set($key$file);
        }
    }

    
Home | Imprint | This part of the site doesn't use cookies.