ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilHTMLToPDFTransformer Class Reference

Abstract class to transform HTML content into PDF content. More...

+ Inheritance diagram for ilHTMLToPDFTransformer:
+ Collaboration diagram for ilHTMLToPDFTransformer:

Public Member Functions

 __construct ($filename="")
 __set ($name, $value)
 __get ($name)
 __isset ($name)
 __unset ($name)
 deliverPDFFromHTMLString ($a_string)
 deliverPDFFromHTMLFile ($a_path)
 createPDFFileFromHTMLFile ($a_source, $a_target)

Static Public Member Functions

static transformerAvailable ()

Protected Member Functions

 generateFilename ()

Protected Attributes

 $arrData

Detailed Description

Abstract class to transform HTML content into PDF content.

Author
Helmut Schottmüller ilias.nosp@m.@aur.nosp@m.ealis.nosp@m..de
Version
$Id$

Definition at line 31 of file class.ilHTMLToPDFTransformer.php.

Constructor & Destructor Documentation

ilHTMLToPDFTransformer::__construct (   $filename = "")

Reimplemented in ilHTMLToPDFTransformerUsingWebkit.

Definition at line 35 of file class.ilHTMLToPDFTransformer.php.

References $filename.

{
$this->arrData = array();
if (strlen($filename))
{
$this->filename = $filename;
}
}

Member Function Documentation

ilHTMLToPDFTransformer::__get (   $name)

Definition at line 84 of file class.ilHTMLToPDFTransformer.php.

References $name, and generateFilename().

{
if (array_key_exists($name, $this->arrData))
{
switch ($name)
{
case 'filename':
if (!strlen($this->arrData[$name]))
{
return $this->generateFilename();
}
else
{
return $this->arrData[$name];
}
break;
default:
return $this->arrData[$name];
break;
}
}
return null;
}

+ Here is the call graph for this function:

ilHTMLToPDFTransformer::__isset (   $name)

Definition at line 108 of file class.ilHTMLToPDFTransformer.php.

References $name.

{
return isset($this->arrData[$name]);
}
ilHTMLToPDFTransformer::__set (   $name,
  $value 
)

Definition at line 63 of file class.ilHTMLToPDFTransformer.php.

References $name, generateFilename(), ilUtil\getASCIIFilename(), and ILIAS_ABSOLUTE_PATH.

{
switch ($name)
{
case 'filename':
if (strlen($value))
{
include_once ILIAS_ABSOLUTE_PATH . "/Services/Utilities/classes/class.ilUtil.php";
$this->arrData[$name] = ilUtil::getASCIIFilename($value);
}
else
{
$this->arrData[$name] = $this->generateFilename();
}
break;
default:
$this->arrData[$name] = $value;
break;
}
}

+ Here is the call graph for this function:

ilHTMLToPDFTransformer::__unset (   $name)

Definition at line 113 of file class.ilHTMLToPDFTransformer.php.

References $name.

{
unset($this->arrData[$name]);
}
ilHTMLToPDFTransformer::createPDFFileFromHTMLFile (   $a_source,
  $a_target 
)
abstract
ilHTMLToPDFTransformer::deliverPDFFromHTMLFile (   $a_path)
abstract
ilHTMLToPDFTransformer::deliverPDFFromHTMLString (   $a_string)
abstract
ilHTMLToPDFTransformer::generateFilename ( )
protected

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

References $filename, and ilUtil\ilTempnam().

Referenced by __get(), and __set().

{
return basename($filename);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilHTMLToPDFTransformer::transformerAvailable ( )
static

Definition at line 44 of file class.ilHTMLToPDFTransformer.php.

Referenced by ilObjTestGUI\createPDFforEveryoneObject(), ilObjTestGUI\getSettingsSubTabs(), ilTestEvaluationGUI\outParticipantsPassDetails(), ilTestEvaluationGUI\outParticipantsResultsOverview(), ilTestEvaluationGUI\outUserResultsOverview(), ilObjTestGUI\printobject(), ilObjSurveyGUI\printViewObject(), and ilTestEvaluationGUI\singleResults().

{
$pdfSetting = new ilSetting("pdf");
if (strlen($pdfSetting->get('html_to_pdf_method')) && strcmp($pdfSetting->get('html_to_pdf_method'), 'none') != 0)
{
return true;
}
else
{
return false;
}
}

+ Here is the caller graph for this function:

Field Documentation

ilHTMLToPDFTransformer::$arrData
protected

Definition at line 33 of file class.ilHTMLToPDFTransformer.php.


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