2 /*=====================================================================*\
3 || ###################################################################
4 || # Blue Static ISSO Framework
5 || # Copyright (c)2005-2008 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');
36 require_once(ISSO
. '/PrinterNavigation.php');
41 * This is the root static framework module for the HTML printer system that
42 * works without templates. Here, you simply set the language and stylesheet
43 * information and use the other classes to generate the code.
46 * @copyright Copyright (c)2005 - 2008, 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';
77 * The copyright string used in the footer
82 // ###################################################################
84 * Constructor (private)
86 private function __construct() {}
88 // ###################################################################
90 * Returns the singleton instance
92 * @return BSPrinter Singleton instance
94 private static function _instance()
98 self
::$instance = new BSPrinter();
100 return self
::$instance;
104 * Returns the copyright string
108 public static function get_copyright()
110 self
::_instance()->copyright
;
114 * Sets the copyright string
116 * @param string The copyright string
118 public static function set_copyright($copyright)
120 self
::_instance()->copyright
= $copyright;
123 // ###################################################################
127 * @return string Realm
129 public static function get_realm()
131 return self
::_instance()->realm
;
134 // ###################################################################
138 * @param string Realm
140 public static function set_realm($realm)
142 self
::_instance()->realm
= $realm;
145 // ###################################################################
147 * Returns the language array
149 * @return array Language array
151 public static function get_language_information()
153 return self
::_instance()->language
;
156 // ###################################################################
158 * Sets the language array information
160 * @param array Language array
162 public static function set_language_information($lang)
164 self
::_instance()->language
= $lang;
167 // ###################################################################
169 * Returns the stylesheet URL
171 * @return string Stylesheet link
173 public static function get_stylesheet()
175 return self
::_instance()->stylesheet
;
178 // ###################################################################
180 * Sets the path to the CSS style sheet
184 public static function set_stylesheet($stylesheet)
186 self
::_instance()->stylesheet
= $stylesheet;