ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
class.ilRenderedImage.php
Go to the documentation of this file.
1 <?php
2 /* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
3 
4 include_once("./Services/Preview/classes/class.ilFilePreviewRenderer.php");
5 
16 {
21  private $img_path = null;
22 
28  private $is_temporary = true;
29 
36  public function __construct($img_path, $is_temporary = true)
37  {
38  $this->img_path = $img_path;
39  $this->is_temporary = $is_temporary;
40  }
41 
47  public function getImagePath()
48  {
49  return $this->img_path;
50  }
51 
57  public function isTemporary()
58  {
59  return $this->is_temporary;
60  }
61 
65  public function delete()
66  {
67  // only delete if not temporary
68  if ($this->isTemporary() && is_file($this->getImagePath()))
69  {
70  @unlink($this->getImagePath());
71  }
72  }
73 }
74 ?>