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

147 lines
2.5 KiB
PHP

<?php
/**
* Klasa sznurka
*
*/
class MfLink extends DataObject {
/**
* nazwa tabeli
*/
static $tableName = 'mf_link';
/**
* nazwa klucza tabeli
*/
static $classTablePK = 'id_mf_link';
/**
* nazwa klasy
*/
static $className = __CLASS__;
/**
* tabela mapująca pola z bazy SQL na pola klasy.
*/
static $fields = array(
'id_mf_link' =>'id',
'source_type' =>'sourceType',
'id_source' =>'idSource',
'destination_type' =>'destinationType',
'id_destination'=>'idDestination',
'weight'=>'weight',
'link_type'=>'linkType',
'published'=>'published'
);
protected $id;
private $sourceType;
private $idSource;
private $destinationType;
private $idDestination;
private $weight = 0;
private $linkType;
private $published = 1;
public function GetId() {
return $this->id;
}
public function SetId($id) {
$this->id = $id;
}
public function GetSourceType() {
return $this->sourceType;
}
public function SetSourceType($sourceType) {
$this->sourceType = $sourceType;
}
public function GetIdSource() {
return $this->idSource;
}
public function SetIdSource($idSource) {
$this->idSource = $idSource;
}
public function GetDestinationType() {
return $this->destinationType;
}
public function SetDestinationType($destinationType) {
$this->destinationType = $destinationType;
}
public function GetIdDestination() {
return $this->idDestination;
}
public function SetIdDestination($idDestination) {
$this->idDestination = $idDestination;
}
public function GetWeight() {
return $this->weight;
}
public function SetWeight($weight) {
$this->weight = $weight;
}
public function GetLinkType() {
return $this->linkType;
}
public function SetLinkType($linkType) {
$this->linkType = $linkType;
}
public function GetPublished() {
return $this->published;
}
public function SetPublished($published) {
$this->published = $published;
}
public function __construct($id = -1) {
$this->SetId($id);
}
/**
* Pobiera nazwę tabeli reprezentującej obiekt w SQL
* @return string
*/
public function GetTableName(){
return self::$tableName;
}
/**
* Pobiera taablice 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;
}
public function GetClassTablePK() {
return self::$classTablePK;
}
}
?>