ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
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
4include_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 {
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?>
Represents an image that was created from a preview renderer and that can be further processed to cre...
getImagePath()
Gets the absolute path to the rendered image.
isTemporary()
Defines whether the image is temporary and can be deleted after the preview was created.
__construct($img_path, $is_temporary=true)
Constructor.