]>
src.bluestatic.org Git - isso.git/blob - Printer.php
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
71 * Realm; the extra bit added to the title
74 private $realm = 'BSPrinterOutput';
76 // ###################################################################
78 * Constructor (private)
80 private function __construct() {}
82 // ###################################################################
84 * Returns the singleton instance
86 * @return BSPrinter Singleton instance
88 private static function _Instance()
92 self
::$instance = new BSPrinter();
94 return self
::$instance;
97 // ###################################################################
101 * @return string Realm
103 public static function GetRealm()
105 return self
::_Instance()->realm
;
108 // ###################################################################
112 * @param string Realm
114 public static function SetRealm($realm)
116 self
::_Instance()->realm
= $realm;
119 // ###################################################################
121 * Returns the language array
123 * @return array Language array
125 public static function GetLanguageInformation()
127 return self
::_Instance()->language
;
130 // ###################################################################
132 * Sets the language array information
134 * @param array Language array
136 public static function SetLanguageInformation($lang)
138 self
::_Instance()->language
= $lang;
141 // ###################################################################
143 * Returns the stylesheet URL
145 * @return string Stylesheet link
147 public static function GetStylesheet()
149 return self
::_Instance()->stylesheet
;
152 // ###################################################################
154 * Sets the path to the CSS style sheet
158 public static function SetStylesheet($stylesheet)
160 self
::_Instance()->stylesheet
= $stylesheet;
164 /*=====================================================================*\
165 || ###################################################################
168 || ###################################################################
169 \*=====================================================================*/