ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
16{
17 protected $object_id; // [int]
18
19 public function isValidPath(array $a_path)
20 {
21 // last element is file
22 array_pop($a_path);
23
24 // 2nd to last: directory with object id
25 $dir = array_pop($a_path);
26
27 // extract id from directory title
28 $obj_id = (int)array_pop(explode("_", $dir));
29 if((int)$obj_id)
30 {
31 $this->object_id = $obj_id;
32 return true;
33 }
34 }
35
36 public function getRepositoryObjectId()
37 {
38 return $this->object_id;
39 }
40
41 public function checkAccess(array $a_user_ids)
42 {
43
44 }
45}
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