1<?php 2/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */ 3 4/** 5 * Class ilPDFGenerationJob 6 * 7 * Data-object blueprint that holds all PDF-generation related settings. 8 * If you add to the methods, see to it that they follow the fluent interface, meaning 9 * that all setters return $this for developer convenience. 10 * 11 * @author Maximilian Becker <mbecker@databay.de> 12 * @version $Id$ 13 * 14 */ 15class ilPDFGenerationJob 16{ 17 private $pages; /** @var $pages string[] HTML pages */ 18 private $filename; /** @var $filename string Filename */ 19 private $output_mode; /** @var $output_mode string Output mode, one D, F or I */ 20 21 /** 22 * @param string $filename 23 * @return $this 24 */ 25 public function setFilename($filename) 26 { 27 $this->filename = $filename; 28 return $this; 29 } 30 31 /** 32 * @return string 33 */ 34 public function getFilename() 35 { 36 return $this->filename; 37 } 38 39 /** 40 * @param $pages string[] Array of html-strings. 41 * 42 * @return $this 43 */ 44 public function setPages($pages) 45 { 46 $this->pages = $pages; 47 return $this; 48 } 49 50 /** 51 * @return string[] Array of html-strings. 52 */ 53 public function getPages() 54 { 55 return $this->pages; 56 } 57 58 /** 59 * @param $page 60 * @return $this 61 */ 62 public function addPage($page) 63 { 64 $this->pages[] = $page; 65 return $this; 66 } 67 68 /** 69 * @return $this 70 */ 71 public function flushPages() 72 { 73 $this->pages = array(); 74 return $this; 75 } 76 77 /** 78 * @param string $output_mode 79 * @return $this 80 */ 81 public function setOutputMode($output_mode) 82 { 83 $this->output_mode = $output_mode; 84 return $this; 85 } 86 87 /** 88 * @return string 89 */ 90 public function getOutputMode() 91 { 92 return $this->output_mode; 93 } 94} 95