aboutsummaryrefslogtreecommitdiff
path: root/app/class/Optlist.php
diff options
context:
space:
mode:
authorVincent Peugnet <33429034+vincent-peugnet@users.noreply.github.com>2019-11-06 11:36:17 +0100
committerGitHub <noreply@github.com>2019-11-06 11:36:17 +0100
commit1add9049bedd3ac381e42ea5c177c5e0b871a50a (patch)
tree0416e194fcbb20ecb4f47d8783c8ad4bd38105e7 /app/class/Optlist.php
parentf1f63f556c41c99d45cd610186b0982383eff375 (diff)
parentc77fe80b05829fbfd5b94f43a7b709e3f3ec6c0d (diff)
downloadwcms-1add9049bedd3ac381e42ea5c177c5e0b871a50a.tar.gz
wcms-1add9049bedd3ac381e42ea5c177c5e0b871a50a.zip
Merge pull request #27 from n-peugnet/composer-psr4-autoloading
refactor: switch to psr-4 autoloading
Diffstat (limited to 'app/class/Optlist.php')
-rw-r--r--app/class/Optlist.php115
1 files changed, 115 insertions, 0 deletions
diff --git a/app/class/Optlist.php b/app/class/Optlist.php
new file mode 100644
index 0000000..d6a9cdb
--- /dev/null
+++ b/app/class/Optlist.php
@@ -0,0 +1,115 @@
+<?php
+
+namespace Wcms;
+
+class Optlist extends Opt
+{
+ protected $title = 1;
+ protected $description = 0;
+ protected $thumbnail = 0;
+ protected $date = 0;
+ protected $time = 0;
+ protected $author = 0;
+ protected $style = 0;
+
+
+
+ public function parsehydrate(string $encoded)
+ {
+ if(is_string($encoded)) {
+ parse_str($encoded, $datas);
+ $this->hydrate($datas);
+ }
+ }
+
+ /**
+ * Get the code to insert directly
+ */
+ public function getcode() : string
+ {
+ return '%LIST?' . $this->getquery() . '%';
+ }
+
+
+
+
+ // _______________________________________ G E T _____________________________________
+
+
+ public function title()
+ {
+ return $this->title;
+ }
+
+ public function description()
+ {
+ return $this->description;
+ }
+
+ public function thumbnail()
+ {
+ return $this->thumbnail;
+ }
+
+ public function date()
+ {
+ return $this->date;
+ }
+
+ public function time()
+ {
+ return $this->time;
+ }
+
+ public function author()
+ {
+ return $this->author;
+ }
+
+ public function style()
+ {
+ return $this->style;
+ }
+
+
+ // _______________________________________ S E T _____________________________________
+
+ public function settitle($title)
+ {
+ $this->title = intval($title);
+ }
+
+ public function setdescription($description)
+ {
+ $this->description = intval($description);
+ }
+
+ public function setthumbnail($thumbnail)
+ {
+ $this->thumbnail = intval($thumbnail);
+ }
+
+ public function setdate($date)
+ {
+ $this->date = intval($date);
+ }
+
+ public function settime($time)
+ {
+ $this->time = intval($time);
+ }
+
+ public function setauthor($author)
+ {
+ $this->author = intval($author);
+ }
+
+ public function setstyle($style)
+ {
+ $this->style = intval($style);
+ }
+}
+
+
+
+?> \ No newline at end of file