ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
class.ilCloudPlugin.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2010 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once("class.ilCloudPluginConfig.php");
5include_once("class.ilObjCloud.php");
6
18{
19
23 protected $obj_id;
31 protected $table_name = "";
43 protected $max_file_size = 25;
47 //protected $async_drawing = false;
48
52 public function __construct($service_name, $obj_id, $cloud_modul_object = null)
53 {
54 $this->setObjId($obj_id);
55
56 $this->plugin_hook_object = ilCloudConnector::getPluginHookClass($service_name);
57 if (!is_object($this->plugin_hook_object)) {
59 }
60 $this->admin_config_object = new ilCloudPluginConfig($this->plugin_hook_object->getPluginConfigTableName());
61 if (!$this->read()) {
62 $this->create();
63 }
64
66 // in the context of deleting, it's possible that the ilObjCloud with this obj_id is already pushing up the daisies
67 // so instantiating it would lead to an error
68 if ($obj_id == 0 || ilObjCloud::_exists($obj_id, false, 'cld')) {
70 }
71 }
73 }
74
75
79 public function setObjId($obj_id)
80 {
81 $this->obj_id = $obj_id;
82 }
83
84
88 public function getObjId()
89 {
90 return $this->obj_id;
91 }
92
93
97 public function getPluginHookObject()
98 {
100 }
101
102
106 public function getAdminConfigObject()
107 {
109 }
110
111
116 {
117 $this->plugin_hook_object = $plugin_hook_object;
118 }
119
120
124 public function getTableName()
125 {
126 return $this->getPluginHookObject()->getPluginTableName();
127 }
128
129
151 {
152 $this->max_file_size = $max_file_size;
153 }
154
155
159 public function getMaxFileSize()
160 {
162 }
163
164
169 {
170 $this->cloud_modul_object = $cloud_modul_object;
171 }
172
173
177 public function getCloudModulObject()
178 {
180 }
181
182
186 public function getOwnerId()
187 {
188 include_once("./Modules/Cloud/classes/class.ilObjCloud.php");
189 $cloud_object = new ilObjCloud($this->getObjId(), false);
190
191 return $cloud_object->getOwnerId();
192 }
193
194
195 public function read()
196 {
197 }
198
199
200 public function create()
201 {
202 }
203
204
205 public function doUpdate()
206 {
207 }
208
209
210 public function doDelete()
211 {
212 }
213}
An exception for terminatinating execution or to throw for unit testing.
static getPluginHookClass($service_name)
Class ilCloudException.
Class ilCloudPluginConfig.
Class ilCloudPlugin.
setMaxFileSize($max_file_size)
__construct($service_name, $obj_id, $cloud_modul_object=null)
setCloudModulObject($cloud_modul_object)
getOwnerId()
$return integer
setPluginHookObject($plugin_hook_object)
Class ilObjCloud.
static _exists($a_id, $a_reference=false, $a_type=null)
checks if an object exists in object_data@access public