ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
class.ilWACSecurePath.php
Go to the documentation of this file.
1<?php
2require_once('./Services/ActiveRecord/class.ActiveRecord.php');
3
11
17 static function returnDbTableName() {
18 return 'il_wac_secure_path';
19 }
20
21
28 public static function getCheckingInstance(ilWACPath $ilWACPath) {
32 $obj = self::find($ilWACPath->getSecurePathId());
33 if (!$obj) {
34 ilWACLog::getInstance()->write('No Checking Instance found for id: ' . $ilWACPath->getSecurePathId());
35
36 return null;
37 }
38 $secure_path_checking_class = $obj->getComponentDirectory() . '/classes/class.' . $obj->getCheckingClass() . '.php';
39 if (!file_exists($secure_path_checking_class)) {
40 ilWACLog::getInstance()->write('Checking Instance not found in path: ' . $secure_path_checking_class);
41
42 return null;
43 }
44
45 require_once($secure_path_checking_class);
46 $class_name = $obj->getCheckingClass();
47
48 return new $class_name();
49 }
50
51
55 public function hasCheckingInstance() {
57 }
58
59
69 protected $path = '';
77 protected $component_directory = '';
85 protected $checking_class = '';
93 protected $in_sec_folder = false;
97 protected $has_checking_instance = false;
98
99
103 public function getPath() {
104 return $this->path;
105 }
106
107
111 public function setPath($path) {
112 $this->path = $path;
113 }
114
115
119 public function getComponentDirectory() {
120 preg_match("/\\/(Services|Modules|Customizing)\\/.*/u", $this->component_directory, $matches);
121
122 // return $this->component_directory;
123 return '.' . $matches[0];
124 }
125
126
131 $this->component_directory = $component_directory;
132 }
133
134
138 public function getCheckingClass() {
140 }
141
142
147 $this->checking_class = $checking_class;
148 }
149
150
155 $this->has_checking_instance = $has_checking_instance;
156 }
157
158
162 public function getInSecFolder() {
164 }
165
166
171 $this->in_sec_folder = $in_sec_folder;
172 }
173}
Class ActiveRecord.
static getInstance()
Class ilWACPath.
Class ilWACSecurePath.
setInSecFolder($in_sec_folder)
setComponentDirectory($component_directory)
setCheckingClass($checking_class)
setHasCheckingInstance($has_checking_instance)