ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilFSStorageMail.php
Go to the documentation of this file.
1 <?php
2 /*
3  +-----------------------------------------------------------------------------+
4  | ILIAS open source |
5  +-----------------------------------------------------------------------------+
6  | Copyright (c) 1998-2009 ILIAS open source, University of Cologne |
7  | |
8  | This program is free software; you can redistribute it and/or |
9  | modify it under the terms of the GNU General Public License |
10  | as published by the Free Software Foundation; either version 2 |
11  | of the License, or (at your option) any later version. |
12  | |
13  | This program is distributed in the hope that it will be useful, |
14  | but WITHOUT ANY WARRANTY; without even the implied warranty of |
15  | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
16  | GNU General Public License for more details. |
17  | |
18  | You should have received a copy of the GNU General Public License |
19  | along with this program; if not, write to the Free Software |
20  | Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. |
21  +-----------------------------------------------------------------------------+
22 */
23 
24 include_once('Services/FileSystemStorage/classes/class.ilFileSystemStorage.php');
34 {
35  private $usr_id = 0;
36 
44  public function __construct($a_container_id, $a_usr_id)
45  {
46  $this->usr_id = $a_usr_id;
47 
48  parent::__construct(self::STORAGE_DATA,true,$a_container_id);
49 
50  $this->appendToPath('_'.$this->usr_id);
51  }
52 
59  protected function getPathPostfix()
60  {
61  return 'mail';
62  }
63 
70  protected function getPathPrefix()
71  {
72  return 'mail';
73  }
74 
76  {
77  switch($this->getStorageType())
78  {
79  case self::STORAGE_DATA:
81  break;
82 
83  case self::STORAGE_WEB:
85  break;
86  }
88  $path .= '/';
89 
90  // Append path prefix
91  $path .= ($this->getPathPrefix().'/');
92 
93  return str_replace($path, '', $this->getAbsolutePath());
94  }
95 }
96 ?>