ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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{
22 protected $obj_id;
23
28
32 protected $table_name = "";
33
38
43
47 protected $max_file_size = 25;
48
52 //protected $async_drawing = false;
53
57 public function __construct($service_name, $obj_id, $cloud_modul_object = null)
58 {
59 $this->setObjId($obj_id);
60
61 $this->plugin_hook_object = ilCloudConnector::getPluginHookClass($service_name);
62 if (!is_object($this->plugin_hook_object)) {
64 }
65 $this->admin_config_object = new ilCloudPluginConfig($this->plugin_hook_object->getPluginConfigTableName());
66 if (!$this->read()) {
67 $this->create();
68 }
69
71 // in the context of deleting, it's possible that the ilObjCloud with this obj_id is already pushing up the daisies
72 // so instantiating it would lead to an error
73 if ($obj_id == 0 || ilObjCloud::_exists($obj_id, false, 'cld')) {
75 }
76 }
78 }
79
83 public function setObjId($obj_id)
84 {
85 $this->obj_id = $obj_id;
86 }
87
91 public function getObjId()
92 {
93 return $this->obj_id;
94 }
95
99 public function getPluginHookObject()
100 {
102 }
103
107 public function getAdminConfigObject()
108 {
110 }
111
116 {
117 $this->plugin_hook_object = $plugin_hook_object;
118 }
119
123 public function getTableName()
124 {
125 return $this->getPluginHookObject()->getPluginTableName();
126 }
127
128
149 {
150 $this->max_file_size = $max_file_size;
151 }
152
156 public function getMaxFileSize()
157 {
159 }
160
165 {
166 $this->cloud_modul_object = $cloud_modul_object;
167 }
168
172 public function getCloudModulObject()
173 {
175 }
176
180 public function getOwnerId()
181 {
182 include_once("./Modules/Cloud/classes/class.ilObjCloud.php");
183 $cloud_object = new ilObjCloud($this->getObjId(), false);
184 return $cloud_object->getOwnerId();
185 }
186
187 public function read()
188 {
189 }
190
191 public function create()
192 {
193 }
194
195 public function doUpdate()
196 {
197 }
198
199 public function doDelete()
200 {
201 }
202}
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