ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
class.ilFileSystemStorageWebAccessChecker.php
Go to the documentation of this file.
1<?php
2/* Copyright (c) 1998-2009 ILIAS open source, Extended GPL, see docs/LICENSE */
3
4include_once "Services/WebAccessChecker/interfaces/interface.ilComponentWebAccessChecker.php";
5
15{
16 protected $object_id; // [int]
17
18 public function isValidPath(array $a_path)
19 {
20 // last element is file
21 array_pop($a_path);
22
23 // 2nd to last: directory with object id
24 $dir = array_pop($a_path);
25
26 // extract id from directory title
27 $obj_id = (int)array_pop(explode("_", $dir));
28 if((int)$obj_id)
29 {
30 $this->object_id = $obj_id;
31 return true;
32 }
33 }
34
35 public function getRepositoryObjectId()
36 {
37 return $this->object_id;
38 }
39
40 public function checkAccess(array $a_user_ids)
41 {
42
43 }
44}
isValidPath(array $a_path)
Check if current (image) path is valid.
getRepositoryObjectId()
Get repository object id from path if any.
interface for modular web access checker