/
Picture.php
45 lines (39 loc) · 1.2 KB
/
Picture.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?php
namespace gossi\trixionary\model;
use gossi\trixionary\model\Base\Picture as BasePicture;
use gossi\trixionary\model\Map\PictureTableMap;
use gossi\trixionary\serializer\PictureSerializer;
use keeko\core\model\ActivityObject;
use keeko\framework\model\ActivityObjectInterface;
use keeko\framework\model\ApiModelInterface;
/**
* Skeleton subclass for representing a row from the 'kk_trixionary_picture' table.
*
* You should add additional methods to this class to meet the
* application requirements. This class will only be generated as
* long as it does not already exist in the output directory.
*/
class Picture extends BasePicture implements ApiModelInterface, ActivityObjectInterface {
/**
*/
private static $serializer;
/**
* @return PictureSerializer
*/
public static function getSerializer() {
if (self::$serializer === null) {
self::$serializer = new PictureSerializer();
}
return self::$serializer;
}
/**
*/
public function toActivityObject() {
$obj = new ActivityObject();
$obj->setType(ActivityObject::TYPE_PHOTO);
$obj->setClassName(PictureTableMap::OM_CLASS);
$obj->setDisplayName($this->getTitle());
$obj->setReferenceId($this->getId());
return $obj;
}
}