2 /*=====================================================================*\
3 || ###################################################################
4 || # Blue Static ISSO Framework
5 || # Copyright ©2002-[#]year[#] Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version [#]gpl[#] of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 * Printer System (printer.php)
28 require_once('ISSO/PrinterElement.php');
29 require_once('ISSO/PrinterBaseElement.php');
30 require_once('ISSO/PrinterLabelElement.php');
31 require_once('ISSO/PrinterRootElement.php');
32 require_once('ISSO/PrinterRootElementPage.php');
33 require_once('ISSO/PrinterRootElementTable.php');
34 require_once('ISSO/PrinterRootElementForm.php');
35 require_once('ISSO/PrinterTableElement.php');
40 * This is the root static framework module for the HTML printer system that
41 * works without templates. Here, you simply set the language and stylesheet
42 * information and use the other classes to generate the code.
45 * @copyright Copyright (c)2002 - [#]year[#], Blue Static
56 private static $instance;
59 * Language information for all printer elements with format array(langcode: en_US, direction: ltr/rtl, charset: utf-8)
62 private $language = array('langcode' => 'en_US', 'direction' => 'ltr', 'charset' => 'utf-8');
65 * CSS stylesheet to link to
70 // ###################################################################
72 * Constructor (private)
74 private function __construct() {}
76 // ###################################################################
78 * Returns the singleton instance
80 * @return BSPrinter Singleton instance
82 public static function _Instance()
84 if (is_null(self
::$instance))
86 self
::$instance = new BSPrinter();
88 return self
::$instance;
91 // ###################################################################
93 * Returns the language array
95 * @return array Language array
97 public static function GetLanguageInformation()
99 return self
::_Instance()->language
;
102 // ###################################################################
104 * Sets the language array information
106 * @param array Language array
108 public static function SetLanguageInformation($lang)
110 self
::_Instance()->language
= $lang;
113 // ###################################################################
115 * Returns the stylesheet URL
117 * @return string Stylesheet link
119 public static function GetStylesheet()
121 return self
::_Instance()->stylesheet
;
124 // ###################################################################
126 * Sets the path to the CSS style sheet
130 public static function SetStylesheet($stylesheet)
132 self
::_Instance()->stylesheet
= $stylesheet;
136 /*=====================================================================*\
137 || ###################################################################
140 || ###################################################################
141 \*=====================================================================*/