Files
zurawik.pl/core/model/MfArticleBox.class.php
2026-05-15 18:33:51 +02:00

172 lines
3.1 KiB
PHP

<?php
/**
* Model dla klasy MfArticleBox
*
* @author ModGen
*/
class MfArticleBox extends DataObject {
/**
* nazwa tabeli
*/
static $tableName = 'mf_article_box';
/**
* nazwa klucza tabeli
*/
static $classTablePK = 'id_mf_article_box';
/**
* nazwa klasy
*/
static $className = __CLASS__;
/**
* tablica mapująca pola klasy
*/
static $fields = array(
'id_mf_article_box' => 'id',
'name' => 'name',
'shortnote' => 'shortnote',
'description' => 'description',
'publication' => 'publication',
'date_publication' => 'datePublication',
'lang' => 'lang',
'weight' => 'weight'
);
protected $id;
private $name;
private $shortnote;
private $description;
private $publication;
private $datePublication;
private $lang;
private $weight;
// -- Konstruktor --
function __construct($id = -1, $name = null, $shortnote = null, $description = null, $publication = null, $datePublication = null, $lang = null) {
$this->id = $id;
$this->name = $name;
$this->shortnote = $shortnote;
$this->description = $description;
$this->publication = $publication;
$this->datePublication = $datePublication;
$this->lang = $lang;
}
// -- Get-y i Set-y --
public function getId() {
return $this->id;
}
public function setId($id) {
$this->id = $id;
}
public function getName() {
return $this->name;
}
public function setName($s) {
$this->name = $s;
}
public function getShortnote() {
return $this->shortnote;
}
public function setShortnote($shortnote) {
$this->shortnote = $shortnote;
}
public function getDescription() {
return $this->description;
}
public function setDescription($description) {
$this->description = $description;
}
public function getPublication() {
return $this->publication;
}
public function setPublication($publication) {
$this->publication = $publication;
}
public function getDatePublication() {
return $this->datePublication;
}
public function setDatePublication($datePublication) {
$this->datePublication = $datePublication;
}
public function GetDatePublicationWithoutTime() {
return substr($this->datePublication, 0, -9);
}
public function GetDatePublicationTime() {
if (!$this->datePublication) {
return '00';
} else {
return substr($this->datePublication, 11, -6);
}
}
public function getLang() {
return $this->lang;
}
public function setLang($lang) {
$this->lang = $lang;
}
public function getWeight() {
return $this->weight;
}
public function setWeight($weight) {
$this->weight = $weight;
}
/**
* Pobiera nazwę tabeli reprezentującej obiekt w SQL
* @return string
*/
public function GetTableName() {
return self::$tableName;
}
/**
* Pobiera nazwę klucza głównego tabeli
* @return string
*/
public function GetClassTablePK() {
return self::$classTablePK;
}
/**
* Pobiera tablice mapującą pola klasy na pola tabeli
* @return array
*/
public function GetFields() {
return self::$fields;
}
/**
* Pobiera nazwę klasy
* @return string
*/
public function GetClassName() {
return self::$className;
}
}
?>