AnonSec Team
Server IP : 10.2.73.233  /  Your IP : 216.73.216.59
Web Server : Apache/2.4.59 (Debian)
System : Linux polon 4.19.0-27-amd64 #1 SMP Debian 4.19.316-1 (2024-06-25) x86_64
User : www-data ( 33)
PHP Version : 5.6.40-64+0~20230107.71+debian10~1.gbp673146
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : ON  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/leksykografia/application/models/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/leksykografia/application/models/Product.php
<?php

 
class Application_Model_Product
{
	protected $_id;
	protected $_active;
	protected $_productType;
	protected $_slug;
    protected $_title1;
    protected $_title2;
    protected $_title3;
    protected $_title4;
    protected $_logo;
    protected $_termFrom;
    protected $_termTo;
    protected $_titleSmall1;
    protected $_titleSmall2;
    protected $_city;
    protected $_pdf;
    protected $_program;
    protected $_place;
    protected $_price1;
    protected $_price2;
    protected $_priceTo;
    protected $_created;
    protected $_template;

    public function __construct(array $options = null)
    {
        if (is_array($options)) {
            $this->setOptions($options);
        }
    }
 
    public function __set($name, $value)
    {
        $method = 'set' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid page property');
        }
        $this->$method($value);
    }
 
    public function __get($name)
    {
        $method = 'get' . $name;
        if (('mapper' == $name) || !method_exists($this, $method)) {
            throw new Exception('Invalid page property');
        }
        return $this->$method();
    }
 
    public function setOptions(array $options)
    {
        $methods = get_class_methods($this);
        foreach ($options as $key => $value) {
            $method = 'set' . ucfirst($key);
            if (in_array($method, $methods)) {
                $this->$method($value);
            }
        }
        return $this;
    }
    
    public function getOptions()
    {
        $vars = get_class_vars('Application_Model_Product');
        $data = array();
        foreach ($vars as $key => $value) {
           $data[ltrim($key,'_')] = $this->$key;
        }
       
        return $data;
    }
 
    public function setProductType($id)
    {
        $this->_productType = $id;
        return $this;
    }
 
    public function getProductType()
    {
        return $this->_productType;
    }
    
    public function setSlug($slug)
    {
    	$this->_slug = (string) $slug;
    	return $this;
    }
    
    public function getSlug()
    {
    	return $this->_slug;
    }
 
    public function setTitle1($title)
    {
        $this->_title1 = (string) $title;
        return $this;
    }
 
    public function getTitle1()
    {
        return $this->_title1;
    }
    
    public function setTitle2($title)
    {
    	$this->_title2 = (string) $title;
    	return $this;
    }
    
    public function getTitle2()
    {
    	return $this->_title2;
    }
    
    public function setTitle3($title)
    {
    	$this->_title3 = (string) $title;
    	return $this;
    }
    
    public function getTitle3()
    {
    	return $this->_title3;
    }
    
    public function setTitle4($title)
    {
    	$this->_title4 = (string) $title;
    	return $this;
    }
    
    public function getTitle4()
    {
    	return $this->_title4;
    }
    
    public function getFullTitle()
    {
    	$title="";
    	if($this->_title1)
    		$title .= $this->_title1. " ";
    	if($this->_title2)
    		$title .= $this->_title2. " ";
    	if($this->_title3)
    		$title .= $this->_title3. " ";
    	if($this->_title4)
    		$title .= $this->_title4;
    	
    	return $title;
    }
    
    public function setLogo($logo)
    {
    	$this->_logo = (string) $logo;
    	return $this;
    }
    
    public function getLogo()
    {
    	return $this->_logo;
    }
    
    public function setTermFrom($term)
    {
    	$this->_termFrom = $term;
    	return $this;
    }
    
    public function getTermFrom()
    {
    	return $this->_termFrom;
    }
    
    public function setTermTo($term)
    {
    	$this->_termTo = $term;
    	return $this;
    }
    
    public function getTermTo()
    {
    	return $this->_termTo;
    }
    
    public function setTitleSmall1($title)
    {
        $this->_titleSmall1 = (string) $title;
        return $this;
    }
 
    public function getTitleSmall1()
    {
        return $this->_titleSmall1;
    }
    
    public function setTitleSmall2($title)
    {
    	$this->_titleSmall2 = (string) $title;
    	return $this;
    }
    
    public function getTitleSmall2()
    {
    	return $this->_titleSmall2;
    }
    
    public function setCity($city)
    {
    	$this->_city = (string) $city;
    	return $this;
    }
    
    public function getCity()
    {
    	return $this->_city;
    }
    
    public function setPdf($pdf)
    {
    	$this->_pdf = (string) $pdf;
    	return $this;
    }
    
    public function getPdf()
    {
    	return $this->_pdf;
    }
    
    public function setProgram($program)
    {
    	$this->_program = (string) $program;
    	return $this;
    }
    
    public function getProgram()
    {
    	return $this->_program;
    }
    
    public function setPlace($place)
    {
    	$this->_place = (string) $place;
    	return $this;
    }
    
    public function getPlace()
    {
    	return $this->_place;
    }
    
    public function setPrice1($price)
    {
    	$this->_price1 = (string) $price;
    	return $this;
    }
    
    public function getPrice1()
    {
    	return $this->_price1;
    }
    
    public function setPrice2($price)
    {
    	$this->_price2 = (string) $price;
    	return $this;
    }
    
    public function getPrice2()
    {
    	return $this->_price2;
    }
    
 
 	public function setPriceTo($to)
    {
    	$this->_priceTo = $to;
    	return $this;
    }
    
    public function getPriceTo()
    {
    	return $this->_priceTo;
    }
    
    public function setActive($active)
    {
        $this->_active = $active;
        return $this;
    }
 
    public function getActive()
    {
        return $this->_active;
    }
    

    
    public function setCreated($ts)
    {
        $this->_created = $ts;
        return $this;
    }
 
    public function getCreated()
    {
     
        return strftime('%d %b %Y',strtotime($this->_created));
    }
    
    public function setTemplate($template)
    {
    	$this->_template = $template;
    	return $this;
    }
    
    public function getTemplate()
    {
    	 
    	return $this->_template;
    }
    
    public function setId($id)
    {
        $this->_id = (int) $id;
        return $this;
    }
 
    public function getId()
    {
        return $this->_id;
    }
}

AnonSec - 2021