<?php

class photogallery
{

    /**
     * Set to TRUE if need create table.
     * @var boolean
     */
    public $create_tables_when_run = FALSE;
    protected $table;
    protected $photo_path = '/assets/uploads/photogallery';
    protected $photo_width;
    protected $photo_height;
    protected $lang_db_data = array();
    protected $label = '';

    public function __construct($table = '', $photo_path = '', $photo_width = FALSE, $photo_height = FALSE)
    {
        $this->set_table($table);
        if (!empty($photo_path)) {
            $this->set_photo_path($photo_path);
        }
        $this->set_photo_width($photo_width);
        $this->set_photo_height($photo_height);
    }

    public function set_table($table)
    {

        $this->table = $table;
    }

    public function set_photo_path($photo_path)
    {

        $this->photo_path = $photo_path;
    }

    public function set_photo_width($photo_width)
    {

        $this->photo_width = $photo_width;
    }

    public function set_photo_height($photo_height)
    {

        $this->photo_height = $photo_height;
    }

    public function set_translate_field($field, $length = 0)
    {

        $this->lang_db_data[$field] = $length;
    }

    public function set_tab_label($label)
    {

        $this->label = $label;
    }

    public function get_table()
    {

        return $this->table;
    }

    public function get_photo_path()
    {

        return $this->photo_path;
    }

    public function get_photo_width()
    {

        return $this->photo_width;
    }

    public function get_photo_height()
    {

        return $this->photo_height;
    }

    public function get_translate_fields()
    {

        return $this->lang_db_data;
    }

    public function get_tab_label()
    {

        return $this->label;
    }

}