|
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 ] |
|---|
<?php
class Application_Model_ProductRegister
{
protected $_id;
protected $_productId;
protected $_discount;
protected $_discount2;
protected $_companyName;
protected $_address1;
protected $_address2;
protected $_nip;
protected $_tel;
protected $_fax;
protected $_email;
protected $_sameAddress;
protected $_corrCompanyName;
protected $_corrAddress1;
protected $_corrAddress2;
protected $_session;
protected $_created;
protected $_status;
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_ProductRegister');
$data = array();
foreach ($vars as $key => $value) {
$data[ltrim($key,'_')] = $this->$key;
}
return $data;
}
public function setProductId($id)
{
$this->_productId = $id;
return $this;
}
public function getProductId()
{
return $this->_productId;
}
public function setDiscount($discount)
{
$this->_discount = $discount;
return $this;
}
public function getDiscount()
{
return $this->_discount;
}
public function setCompanyName($name)
{
$this->_companyName = $name;
return $this;
}
public function setDiscount2($discount2)
{
$this->_discount2 = $discount2;
return $this;
}
public function getDiscount2()
{
return $this->_discount2;
}
public function getCompanyName()
{
return $this->_companyName;
}
public function setAddress1($address)
{
$this->_address1 = $address;
return $this;
}
public function getAddress1()
{
return $this->_address1;
}
public function setAddress2($address)
{
$this->_address2 = $address;
return $this;
}
public function getAddress2()
{
return $this->_address2;
}
public function setNip($nip)
{
$this->_nip = $nip;
return $this;
}
public function getNip()
{
return $this->_nip;
}
public function setTel($tel)
{
$this->_tel = $tel;
return $this;
}
public function getTel()
{
return $this->_tel;
}
public function setFax($fax)
{
$this->_fax = $fax;
return $this;
}
public function getFax()
{
return $this->_fax;
}
public function setEmail($email)
{
$this->_email = $email;
return $this;
}
public function getEmail()
{
return $this->_email;
}
public function setSameAddress($same)
{
$this->_sameAddress = $same;
return $this;
}
public function getSameAddress()
{
return $this->_sameAddress;
}
public function setCorrCompanyName($comapnyName)
{
$this->_corrCompanyName = $comapnyName;
return $this;
}
public function getCorrCompanyName()
{
return $this->_corrCompanyName;
}
public function setCorrAddress1($address)
{
$this->_corrAddress1 = $address;
return $this;
}
public function getCorrAddress1()
{
return $this->_corrAddress1;
}
public function setCorrAddress2($address)
{
$this->_corrAddress2 = $address;
return $this;
}
public function getCorrAddress2()
{
return $this->_corrAddress2;
}
public function setSession($session)
{
$this->_session = $session;
return $this;
}
public function getSession()
{
return $this->_session;
}
public function setCreated($ts)
{
$this->_created = $ts;
return $this;
}
public function getCreated()
{
return strftime('%d %b %Y',strtotime($this->_created));
}
public function setStatus($status)
{
$this->_status = $status;
return $this;
}
public function getStatus()
{
return $this->_status;
}
public function setId($id)
{
$this->_id = (int) $id;
return $this;
}
public function getId()
{
return $this->_id;
}
}