|
@@ -0,0 +1,101 @@
|
|
|
+<?php
|
|
|
+/**
|
|
|
+ * Created by PhpStorm.
|
|
|
+ * User: stanley-king
|
|
|
+ * Date: 2017/7/5
|
|
|
+ * Time: 下午6:13
|
|
|
+ */
|
|
|
+
|
|
|
+namespace ugc;
|
|
|
+
|
|
|
+
|
|
|
+interface IUGContent
|
|
|
+{
|
|
|
+ function format();
|
|
|
+}
|
|
|
+
|
|
|
+class pics_item implements IUGContent
|
|
|
+{
|
|
|
+ private $mTitle;
|
|
|
+ private $mImages;
|
|
|
+
|
|
|
+ public function __construct($tite='')
|
|
|
+ {
|
|
|
+ $this->mTitle = $tite;
|
|
|
+ $this->mImages = [];
|
|
|
+ }
|
|
|
+ public function set_images($images)
|
|
|
+ {
|
|
|
+ $this->mImages = $images;
|
|
|
+ }
|
|
|
+ public function add_image($image) {
|
|
|
+ $this->mImages[] = $image;
|
|
|
+ }
|
|
|
+ function format()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+class text_item implements IUGContent
|
|
|
+{
|
|
|
+ function format()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+class goods_item implements IUGContent
|
|
|
+{
|
|
|
+ function format()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class voice_item implements IUGContent
|
|
|
+{
|
|
|
+ function format()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+class vote_item implements IUGContent
|
|
|
+{
|
|
|
+ function format()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+class question_item implements IUGContent
|
|
|
+{
|
|
|
+ function format()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
+class special_object
|
|
|
+{
|
|
|
+ private $share_title;
|
|
|
+ private $share_image;
|
|
|
+
|
|
|
+ private $contents;
|
|
|
+
|
|
|
+ public function __construct()
|
|
|
+ {
|
|
|
+ $this->contents = [];
|
|
|
+ }
|
|
|
+
|
|
|
+ public function set_share($title,$image) {
|
|
|
+ $this->share_title = $title;
|
|
|
+ $this->share_image = $image;
|
|
|
+ }
|
|
|
+ public function add_item(IUGContent $item)
|
|
|
+ {
|
|
|
+ $this->contents[] = $item;
|
|
|
+ }
|
|
|
+
|
|
|
+ public function save()
|
|
|
+ {
|
|
|
+
|
|
|
+ }
|
|
|
+}
|