| Server IP : 103.234.187.230 / Your IP : 216.73.216.216 Web Server : Apache System : Linux lserver42043-ind.megavelocity.net 3.10.0-1160.108.1.el7.x86_64 #1 SMP Thu Jan 25 16:17:31 UTC 2024 x86_64 User : apache ( 48) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/holidays.tripjack.com/application/modules/detail/models/ |
Upload File : |
<?php
class Detail_Model_Package {
protected $_id;
protected $_mapper;
public function __construct(array $options = null) {
if (is_array($options)) {
$this->setOptions($options);
}
}
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 __set($name, $value) {
$method = 'set' . $name;
if ('mapper' == $name || !method_exists($this, $method)) {
throw Exception('Invalid property specified');
}
$this->$method($value);
}
public function __get($name) {
$method = 'get' . $name;
if ('mapper' == $name || !method_exists($this, $method)) {
throw Exception('Invalid property specified');
}
return $this->$method();
}
public function setId($text) {
$this->_id = (string) $text;
return $this;
}
public function getId() {
return $this->_id;
}
public function setMapper($mapper) {
$this->_mapper = $mapper;
return $this;
}
public function getMapper() {
if (null === $this->_mapper) {
$this->setMapper(new Customer_Model_RegisterMapper());
}
return $this->_mapper;
}
function getRegistrationDate() {
$date = new Zend_Date();
$entry_date = $date->get('YYYY-MM-dd HH:mm:ss');
return $entry_date;
}
public function save() {
$this->getMapper()->save($this);
}
}
?>