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/Dictionary.php
<?php

 
class Application_Model_Dictionary
{
	protected $_id;
	protected $_active;
	protected $_title;
	protected $_slug;
	protected $_author;
	protected $_authorLastname;
	protected $_year;
    protected $_type;
    protected $_cover;
    protected $_entryPdf;
    protected $_entryImage;
    protected $_fullTitle;
    protected $_languages;
    protected $_entrysNumber;
    protected $_entrysLayout;
    protected $_fullAuthor;
    protected $_characteristic;
    protected $_workshopInnovation;
    protected $_entryConstruction;
    protected $_others;
    protected $_interest;
    protected $_issues;
    protected $_electronicVersion;
    protected $_monographs;
    protected $_descriptionAuthor;
    protected $_consultation;
    protected $_created;
    protected $_vocabularyRangeId;

    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_Dictionary');
        $data = array();
        foreach ($vars as $key => $value) {
           $data[ltrim($key,'_')] = $this->$key;
        }
       
        return $data;
    }

    public function setActive($active)
    {
    	$this->_active = (string) $active;
    	return $this;
    }
    
    public function getActive()
    {
    	return $this->_active;
    }
    
    public function setTitle($title)
    {
    	$this->_title = (string) $title;
    	return $this;
    }
    
    public function getTitle()
    {
    	return $this->_title;
    }
    
 	public function setSlug($slug)
    {
    	$this->_slug = (string) $slug;
    	return $this;
    }
    
    public function getSlug()
    {
    	return $this->_slug;
    }
 
   
    public function setAuthor($txt)
    {
    	$this->_author = (string) $txt;
    	return $this;
    }
    
    public function getAuthor()
    {
    	return $this->_author;
    }
    
    public function setAuthorLastname($txt)
    {
    	$this->_authorLastname = (string) $txt;
    	return $this;
    }
    
    public function getAuthorLastname()
    {
    	return $this->_authorLastname;
    }
   
    
    public function setYear($txt)
    {
    	$this->_year = (string) $txt;
    	return $this;
    }
    
    public function getYear()
    {
    	return $this->_year;
    }
    
    public function getYearColor()
    {
    	if($this->_year)
    	{
    		$years = array_reverse(explode('-',str_replace(" ","",$this->_year)));
    		if($years[0] == "")
    			$years[0] = $years[1];
    		if($years[0] > 1989)
    			return 'blue';
    		if($years[0] > 1945)
    			return 'violet';
    		if($years[0] > 1772)
    			return 'orange';
    		if($years[0] > 1400)
    			return 'brown';
    		if($years[0] > 1136)
    			return 'gray';
    		if($years[0] < 1136)
    			return 'silver';
  
    	}
    	
    	return false;
    }
    
    
    
    
    public function setType($type)
    {
    	$this->_type = (int) $type;
    	return $this;
    }
    
    public function getType()
    {
    	return $this->_type;
    }
    
    public function setCover($txt)
    {
    	$this->_cover = (string) $txt;
    	return $this;
    }
    
    public function getCover()
    {
    	return $this->_cover;
    }
    
    
    public function getSmallCover()
    {
    	
    	$pathinfo = pathinfo($this->_cover);
    	$ext = $pathinfo['extension'];
    	$filename = $pathinfo['filename'];
    	$coverName = $pathinfo['basename'];
    	
    	$webPath = "/uploads/dictionary/".$this->_id.'/';
    	
    	
    	return $webPath.$filename.'-small.'.$ext;
    	
    }
    
    public function getMediumCover()
    {
    	 
    	$pathinfo = pathinfo($this->_cover);
    	$ext = $pathinfo['extension'];
    	$filename = $pathinfo['filename'];
    	$coverName = $pathinfo['basename'];
    	 
    	$webPath = "/uploads/dictionary/".$this->_id.'/';
    	 
    	 
    	return $webPath.$filename.'-medium.'.$ext;
    	 
    }
    
   
    public function setEntryPdf($txt)
    {
    	$this->_entryPdf = (string) $txt;
    	return $this;
    }
    
    public function getEntryPdf()
    {
    	return $this->_entryPdf;
    }
    
    public function setEntryImage($txt)
    {
    	$this->_entryImage = (string) $txt;
    	return $this;
    }
    
    public function getEntryImage()
    {
    	return $this->_entryImage;
    }
    
    public function setFullTitle($txt)
    {
    	$this->_fullTitle = (string) $txt;
    	return $this;
    }
    
    public function getFullTitle()
    {
    	return $this->_fullTitle;
    }
        
    public function setLanguages($txt)
    {
    	$this->_languages = (string) $txt;
    	return $this;
    }
    
    public function getLanguages()
    {
    	return $this->_languages;
    }
    
    public function setEntrysNumber($txt)
    {
    	$this->_entrysNumber= (string) $txt;
    	return $this;
    }
    
    public function getEntrysNumber()
    {
    	return $this->_entrysNumber;
    }
    
    public function setEntrysLayout($txt)
    {
    	$this->_entrysLayout = (string) $txt;
    	return $this;
    }
    
    public function getEntrysLayout()
    {
    	return $this->_entrysLayout;
    }
    
    public function setFullAuthor($txt)
    {
    	$this->_fullAuthor = (string) $txt;
    	return $this;
    }
    
    public function getFullAuthor()
    {
    	return $this->_fullAuthor;
    }
    
    public function setCharacteristic($txt)
    {
    	$this->_characteristic = (string) $txt;
    	return $this;
    }
    
    public function getCharacteristic()
    {
    	return $this->_characteristic;
    }
    public function setWorkshopInnovation($txt)
    {
    	$this->_workshopInnovation = (string) $txt;
    	return $this;
    }
    
    public function getWorkshopInnovation()
    {
    	return $this->_workshopInnovation;
    }
    public function setEntryConstruction($txt)
    {
    	$this->_entryConstruction = (string) $txt;
    	return $this;
    }
    
    public function getEntryConstruction()
    {
    	return $this->_entryConstruction;
    }
    
    public function setOthers($txt)
    {
    	$this->_others = (string) $txt;
    	return $this;
    }
    
    public function getOthers()
    {
    	return $this->_others;
    }
    
    public function setInterest($txt)
    {
    	$this->_interest = (string) $txt;
    	return $this;
    }
    
    public function getInterest()
    {
    	return $this->_interest;
    }
    
    public function setIssues($txt)
    {
    	$this->_issues = (string) $txt;
    	return $this;
    }
    
    public function getIssues()
    {
    	return $this->_issues;
    }
    
    public function setElectronicVersion($txt)
    {
    	$this->_electronicVersion = (string) $txt;
    	return $this;
    }
    
    public function getElectronicVersion()
    {
    	return $this->_electronicVersion;
    }
    
    public function setMonographs($txt)
    {
    	$this->_monographs = (string) $txt;
    	return $this;
    }
    
    public function getMonographs()
    {
    	return $this->_monographs;
    }
    
    public function setDescriptionAuthor($txt)
    {
    	$this->_descriptionAuthor = (string) $txt;
    	return $this;
    }
    
    public function getDescriptionAuthor()
    {
    	return $this->_descriptionAuthor;
    }
    
    
    public function setConsultation($txt)
    {
    	$this->_consultation = (string) $txt;
    	return $this;
    }
    
    public function getConsultation()
    {
    	return $this->_consultation;
    }
    
    
    public function setCreated($txt)
    {
    	$this->_created = (string) $txt;
    	return $this;
    }
    
    public function getCreated()
    {
    	return $this->_created;
    }
   
    public function setId($id)
    {
        $this->_id = (int) $id;
        return $this;
    }
 
    public function getId()
    {
        return $this->_id;
    }
    
    public function setVocabularyRangeId($id)
    {
    	$this->_vocabularyRangeId = (int) $id;
    	return $this;
    }
    
    public function getVocabularyRangeId()
    {
    	return $this->_vocabularyRangeId;
    }
    
    
}

AnonSec - 2021