PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/php/photobucket_external_repository_object.class.php

https://bitbucket.org/chamilo/chamilo-ext-repo-photobucket-dev/
PHP | 76 lines | 48 code | 11 blank | 17 comment | 0 complexity | 140daaf852b8c2692842941b99788770 MD5 | raw file
 1<?php
 2namespace common\extensions\external_repository_manager\implementation\photobucket;
 3
 4use common\extensions\external_repository_manager\ExternalRepositoryObject;
 5/**
 6 *
 7 * @author magali.gillard
 8 *
 9 */
10class PhotobucketExternalRepositoryObject extends ExternalRepositoryObject
11{
12    const OBJECT_TYPE = 'photobucket';
13    
14    const PROPERTY_TAGS = 'tags';
15    const PROPERTY_URL = 'url';
16    const PROPERTY_THUMBNAIL = 'thumbnail';
17
18    function get_tags()
19    {
20        return $this->get_default_property(self :: PROPERTY_TAGS);
21    }
22
23    function set_tags($tags)
24    {
25        return $this->set_default_property(self :: PROPERTY_TAGS, $tags);
26    }
27
28    function get_tags_string()
29    {
30        return implode(", ", $this->get_tags());
31    }
32
33    static function get_default_property_names()
34    {
35        return parent :: get_default_property_names(array(self :: PROPERTY_TAGS, self :: PROPERTY_URL, 
36                self :: PROPERTY_THUMBNAIL));
37    }
38
39    static function get_object_type()
40    {
41        return self :: OBJECT_TYPE;
42    }
43
44    /**
45     * @param $url the $url to set
46     */
47    public function set_url($url)
48    {
49        $this->set_default_property(self :: PROPERTY_URL, $url);
50    }
51
52    /**
53     * @return the $url
54     */
55    public function get_url()
56    {
57        return $this->get_default_property(self :: PROPERTY_URL);
58    }
59
60    /**
61     * @return the $thumbnail
62     */
63    public function get_thumbnail()
64    {
65        return $this->get_default_property(self :: PROPERTY_THUMBNAIL);
66    }
67
68    /**
69     * @param $thumbnail the $thumbnail to set
70     */
71    public function set_thumbnail($thumbnail)
72    {
73        $this->set_default_property(self :: PROPERTY_THUMBNAIL, $thumbnail);
74    }
75}
76?>