A PHP Error was encountered

Severity: 8192

Message: Function create_function() is deprecated

Filename: geshi/geshi.php

Line Number: 4698

Backtrace:

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4698
Function: _error_handler

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 4621
Function: _optimize_regexp_list_tokens_to_string

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 1655
Function: optimize_regexp_list

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2029
Function: optimize_keyword_group

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/geshi/geshi.php
Line: 2168
Function: build_parse_cache

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/libraries/Process.php
Line: 45
Function: parse_code

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/models/Pastes.php
Line: 517
Function: syntax

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/application/controllers/Main.php
Line: 693
Function: getPaste

File: /home/httpd/vhosts/scratchbook.ch/geopaste.scratchbook.ch/index.php
Line: 315
Function: require_once

Price entity - Stikked
From Petr Svetr, 10 Years ago, written in PHP.
Embed
  1. <?php
  2.  
  3. namespace Product\Model;
  4.  
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Core\Model\Traits\IdentifierTrait;
  7. use Nette\Utils\DateTime;
  8.  
  9.  
  10. /**
  11.  * Class Price
  12.  *
  13.  * @ORM\Entity
  14.  * @ORM\Table(name="be_price")
  15.  *
  16.  * @author Petr Blazicek 2016
  17.  */
  18. class Price extends \Nette\Object
  19. {
  20.  
  21.         use IdentifierTrait;
  22.  
  23.         const VAT_BASIC = 21;
  24.         const VAT_FIRST_REDUCED = 15;
  25.         const VAT_SECOND_REDUCED = 10;
  26.  
  27.  
  28.         /**
  29.          * @Column(type="integer", nullable=false)
  30.          * @var int
  31.          */
  32.         protected $vat = self::VAT_BASIC;
  33.  
  34.         /**
  35.          * @Column(type="decimal", precision=10, scale=2, nullable=false)
  36.          * @var string
  37.          */
  38.         protected $original;
  39.  
  40.         /**
  41.          * @Column(type="decimal", precision=10, scale=2, nullable=false)
  42.          * @var string
  43.          */
  44.         protected $action;
  45.  
  46.         /**
  47.          * @Column(type="datetime")
  48.          * @var DateTime
  49.          */
  50.         protected $fromDate;
  51.  
  52.         /**
  53.          * @Column(type="datetime")
  54.          * @var DateTime
  55.          */
  56.         protected $toDate;
  57.  
  58.  
  59.         // Getters & Setters
  60.  
  61.         public function getVat()
  62.         {
  63.                 return $this->vat;
  64.         }
  65.  
  66.  
  67.         public function getOriginal()
  68.         {
  69.                 return $this->original;
  70.         }
  71.  
  72.  
  73.         public function getAction()
  74.         {
  75.                 return $this->action;
  76.         }
  77.  
  78.  
  79.         public function getFromDate()
  80.         {
  81.                 return $this->fromDate;
  82.         }
  83.  
  84.  
  85.         public function getToDate()
  86.         {
  87.                 return $this->toDate;
  88.         }
  89.  
  90.  
  91.         public function setVat( $vat )
  92.         {
  93.                 $this->vat = $vat;
  94.                 return $this;
  95.         }
  96.  
  97.  
  98.         public function setOriginal( $original )
  99.         {
  100.                 $this->original = $original;
  101.                 return $this;
  102.         }
  103.  
  104.  
  105.         public function setAction( $action )
  106.         {
  107.                 $this->action = $action;
  108.                 return $this;
  109.         }
  110.  
  111.  
  112.         public function setFromDate( DateTime $fromDate )
  113.         {
  114.                 $this->fromDate = $fromDate;
  115.                 return $this;
  116.         }
  117.  
  118.  
  119.         public function setToDate( DateTime $toDate )
  120.         {
  121.                 $this->toDate = $toDate;
  122.                 return $this;
  123.         }
  124.  
  125. }
  126.