Stud.IP  5.4
 All Data Structures Namespaces Files Functions Variables Groups
ExportDocument Interface Reference
Inheritance diagram for ExportDocument:

Public Member Functions

 addPage ()
 addContent ($content)
 dispatch ($filename)
 save ($filename, $folder_id=null)

Detailed Description

This interface describes a basic structure for a class that exports content or many contents within a document. It is used in ExportPDF, but could be used for classes that export Excel or OpenDocument files as well. The main operation to get a document by stud.ip-formatted text is quite simple:

$doc = new ExportPDF(); $doc->addPage(); $doc->addContent('Hallo, %wir%% benutzen :studip: -Formatierung.'); $doc->dispatch("test_pdf"); //lines following dispatch won't be accessed anymor, because dispatch //cancels all other output.

Member Function Documentation

addContent (   $content)

Adding an area of Stud.IP formatted content.

Implemented in ExportPDF.

addPage ( )

Adding a new page to write new content on it. Must be called at least once before any call of addContent($text).

dispatch (   $filename)

Outputs the content as a file with MIME-type and aborts any other output.

string$filenamename of the future file without the extension.

Implemented in ExportPDF.

save (   $filename,
  $folder_id = null 

Saves the content as a file in the filesystem and returns a Stud.IP-document object.

string$filenamename of the future file without the extension.
mixed$folder_idmd5-id of a given folder in database or null for nothing
StudipDocument of the exported file or false if creation of StudipDocument failed.

Implemented in ExportPDF.

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