<?php

class image_upload
{

    protected $field;
    protected $path = '/assets/uploads/multimedia/images';
    protected $width;
    protected $height;
    protected $quality = 75;
    protected $backgroundRGB = [255, 255, 255];

    public function __construct($field = '', $path = '', $width = 0, $height = 0)
    {

        $this->set_field($field);

        if (!empty($path)) {
            $this->set_path($path);
        }

        $this->set_width($width);
        $this->set_height($height);
    }

    public function set_field($field)
    {

        $this->field = $field;
    }

    public function set_path($path)
    {

        $this->path = '/' . trim($path, '/');
    }

    public function set_width($width)
    {

        $this->width = $width;
    }

    public function set_height($height)
    {

        $this->height = $height;
    }

    public function set_quality($quality)
    {

        $this->quality = $quality;
    }

    public function set_backgroundRGB($backgroundRGB)
    {

        $this->backgroundRGB = $backgroundRGB;
    }

    public function get_field()
    {

        return $this->field;
    }

    public function get_path()
    {

        return $this->path;
    }

    public function get_width()
    {

        return $this->width;
    }

    public function get_height()
    {

        return $this->height;
    }

    public function get_quality()
    {

        return $this->quality;
    }

    public function get_backgroundRGB()
    {

        return $this->backgroundRGB;
    }
}
