2016-11-21 20:55:05 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
class Article extends DataStore {
|
|
|
|
const TABLE = 'article';
|
|
|
|
|
2016-11-24 22:02:18 +01:00
|
|
|
public static function getProps() {
|
2016-11-21 20:55:05 +01:00
|
|
|
return [
|
|
|
|
'title',
|
|
|
|
'content',
|
|
|
|
'lastEdited',
|
2016-11-23 02:27:05 +01:00
|
|
|
'topic',
|
2016-11-21 20:55:05 +01:00
|
|
|
'position'
|
|
|
|
];
|
|
|
|
}
|
2016-11-23 02:27:05 +01:00
|
|
|
|
|
|
|
public function toArray() {
|
|
|
|
return [
|
|
|
|
'id' => $this->id,
|
|
|
|
'title' => $this->title,
|
|
|
|
'content' => $this->content,
|
|
|
|
'lastEdited' => $this->lastEdited,
|
|
|
|
'position' => $this->position
|
|
|
|
];
|
|
|
|
}
|
2016-11-21 20:55:05 +01:00
|
|
|
}
|