Core  3.2
PHP API documentation
 All Data Structures Namespaces Files Functions Variables Pages
ErrorCodeLAY.php
Go to the documentation of this file.
1 <?php
2 /*
3  * @author Anakeen
4  * @package FDL
5 */
6 namespace {
7  /**
8  * Error codes used when generate template
9  * @class ErrorCodeLAY
10  * @brief List all error code for layout generation
11  * @see ErrorCode
12  * @see Layout
13  * @see OooLayout
14  */
16  {
17  /**
18  * @errorCode the template file is not found
19  */
20  const LAY0001 = 'Ooo Layout not found : %s';
21  /**
22  * the attribute HTMLTEXT must be placed in a single paragraph in OOo Layout
23  * @errorCode the attribute HTMLTEXT must be placed in a single paragraph
24  *
25  * It can be placed in table cell or in frame if it is only
26  */
27  const LAY0002 = 'HTML attribute %s misplaced';
28  /**
29  * the file used for template seems to not be an openDocument Text file
30  * @errorCode template file type error
31  *
32  */
33  const LAY0003 = 'The file "%s" is not an openDocumentText';
34  /**
35  * An XML parse error occurs during content XML generation
36  * the corrupted file contains the XML which has error
37  * @errorCode open Document XML error
38  *
39  */
40  const LAY0004 = 'Cannot produce open Document Text file from %s template';
41  /**
42  * the attribute HTMLTEXT must be placed in a single paragraph in OOo Layout
43  * @errorCode the attribute HTMLTEXT must be placed in a single paragraph
44  *
45  * Thes section must be under 'office:text', 'text:text-content' or 'text:office-text-content-main'
46  */
47  const LAY0005 = 'HTML attribute %s misplaced';
48  /**
49  * The PHP exec() call failed
50  * @errorCode The PHP exec() call failed (internal PHP dysfunction, kernel resource exhaustion, etc.)
51  */
52  const LAY0006 = "Error in exec() call: %s";
53  /**
54  * The decompression of the template failed
55  * @errorCode The decompression of the template failed (missing 'unzip' command, invalid Zip file format, insufficient disk space, etc.)
56  */
57  const LAY0007 = "Decompression of '%s' failed with error: %s";
58  /**
59  * The <automatic-styles> tag was not found in the XSLT output
60  */
61  const LAY0008 = "Missing automatic-styles tag in '%s'";
62  /**
63  * The <automatic-styles> tag was not found in the ODT template
64  */
65  const LAY0009 = "Missing automatic-styles tag in ODT template '%s'";
66  /**
67  * for beautifier
68  */
69  private function _bo()
70  {
71  if (true) return;
72  }
73  }
74 }
75 namespace Dcp\Layout {
76  class Exception extends \Dcp\Exception
77  {
78  /**
79  * @var string corrupted file which content generation
80  */
81  protected $corruptedFile = '';
82  /**
83  * get Corrupted file : partial layout generation
84  * @return string
85  */
86  public function getCorruptedFile()
87  {
88  return $this->corruptedFile;
89  }
90  /**
91  * @param string $cf Corrupted file to set
92  * @return mixed
93  */
94  public function setCorruptedFile($cf)
95  {
96  return $this->corruptedFile = $cf;
97  }
98  public function __construct($code, $message, $corruptedFile = '')
99  {
100 
101  $this->corruptedFile = $corruptedFile;
102  parent::__construct($code, $message);
103  }
104  /**
105  * for beautifier
106  */
107  private function _bo()
108  {
109  if (true) return;
110  }
111  }
112 }
Exception class use exceptionCode to identifiy correctly exception.
Definition: exceptions.php:19
$message
List all error code for layout generation.
__construct($code, $message, $corruptedFile= '')
← centre documentaire © anakeen