aboutsummaryrefslogtreecommitdiff
path: root/class/class.art.php
diff options
context:
space:
mode:
Diffstat (limited to 'class/class.art.php')
-rw-r--r--class/class.art.php15
1 files changed, 11 insertions, 4 deletions
diff --git a/class/class.art.php b/class/class.art.php
index cc7a0d0..897cd0b 100644
--- a/class/class.art.php
+++ b/class/class.art.php
@@ -44,7 +44,7 @@ class Art
}
}
- public function default()
+ public function reset()
{
$now = new DateTimeImmutable(null, timezone_open("Europe/Paris"));
@@ -83,9 +83,14 @@ class Art
return $this->intro;
}
- public function tag()
+ public function tag($option)
{
- return $this->tag;
+ if ($option == 'string') {
+ $tag = implode(", ", $this->tag);
+ } elseif ($option == 'array') {
+ $tag = $this->tag;
+ }
+ return $tag;
}
public function datecreation($option)
@@ -178,7 +183,9 @@ class Art
public function settag($tag)
{
if (strlen($tag) < self::$len and is_string($tag)) {
- $this->tag = strip_tags(trim(strtolower($tag)));
+ $tag = strip_tags(trim(strtolower($tag)));
+ $taglist = explode(", ", $tag);
+ $this->tag = $taglist;
}
}