ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilRenderedImage Class Reference

Represents an image that was created from a preview renderer and that can be further processed to create the preview. More...

+ Collaboration diagram for ilRenderedImage:

Public Member Functions

 __construct ($img_path, $is_temporary=true)
 Constructor.
 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.
 delete ()
 Deletes the image file if it is temporary.

Private Attributes

 $img_path = null
 $is_temporary = true

Detailed Description

Represents an image that was created from a preview renderer and that can be further processed to create the preview.

Author
Stefan Born stefa.nosp@m.n.bo.nosp@m.rn@ph.nosp@m.zh.c.nosp@m.h
Version
$Id$

Definition at line 15 of file class.ilRenderedImage.php.

Constructor & Destructor Documentation

ilRenderedImage::__construct (   $img_path,
  $is_temporary = true 
)

Constructor.

Parameters
string$img_pathThe absolute path to the image.
bool$is_temporaryDefines whether the image is temporary and can be deleted after the preview was created.

Definition at line 36 of file class.ilRenderedImage.php.

References $img_path, and $is_temporary.

{
$this->img_path = $img_path;
$this->is_temporary = $is_temporary;
}

Member Function Documentation

ilRenderedImage::delete ( )

Deletes the image file if it is temporary.

Definition at line 65 of file class.ilRenderedImage.php.

References getImagePath(), and isTemporary().

{
// only delete if not temporary
if ($this->isTemporary() && is_file($this->getImagePath()))
{
@unlink($this->getImagePath());
}
}

+ Here is the call graph for this function:

ilRenderedImage::getImagePath ( )

Gets the absolute path to the rendered image.

Returns
string The absolute path to the rendered image.

Definition at line 47 of file class.ilRenderedImage.php.

References $img_path.

Referenced by delete().

{
}

+ Here is the caller graph for this function:

ilRenderedImage::isTemporary ( )

Defines whether the image is temporary and can be deleted after the preview was created.

Returns
bool true, if the image is temporary and can be deleted after the preview was created; otherwise, false.

Definition at line 57 of file class.ilRenderedImage.php.

References $is_temporary.

Referenced by delete().

{
}

+ Here is the caller graph for this function:

Field Documentation

ilRenderedImage::$img_path = null
private

Definition at line 21 of file class.ilRenderedImage.php.

Referenced by __construct(), and getImagePath().

ilRenderedImage::$is_temporary = true
private

Definition at line 28 of file class.ilRenderedImage.php.

Referenced by __construct(), and isTemporary().


The documentation for this class was generated from the following file: