2 /*=====================================================================*\
3 || ###################################################################
4 || # Blue Static ISSO Framework
5 || # Copyright (c)2002-2007 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 2 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 - 2007, Blue Static
55 private static $instance;
58 * Language information for all printer elements with format array(langcode: en_US, direction: ltr/rtl, charset: utf-8)
61 private $language = array('langcode' => 'en_US', 'direction' => 'ltr', 'charset' => 'utf-8');
64 * CSS stylesheet to link to
70 * Realm; the extra bit added to the title
73 private $realm = 'BSPrinterOutput';
75 // ###################################################################
77 * Constructor (private)
79 private function __construct() {}
81 // ###################################################################
83 * Returns the singleton instance
85 * @return BSPrinter Singleton instance
87 private static function _Instance()
91 self
::$instance = new BSPrinter();
93 return self
::$instance;
96 // ###################################################################
100 * @return string Realm
102 public static function GetRealm()
104 return self
::_Instance()->realm
;
107 // ###################################################################
111 * @param string Realm
113 public static function SetRealm($realm)
115 self
::_Instance()->realm
= $realm;
118 // ###################################################################
120 * Returns the language array
122 * @return array Language array
124 public static function GetLanguageInformation()
126 return self
::_Instance()->language
;
129 // ###################################################################
131 * Sets the language array information
133 * @param array Language array
135 public static function SetLanguageInformation($lang)
137 self
::_Instance()->language
= $lang;
140 // ###################################################################
142 * Returns the stylesheet URL
144 * @return string Stylesheet link
146 public static function GetStylesheet()
148 return self
::_Instance()->stylesheet
;
151 // ###################################################################
153 * Sets the path to the CSS style sheet
157 public static function SetStylesheet($stylesheet)
159 self
::_Instance()->stylesheet
= $stylesheet;