]>
src.bluestatic.org Git - isso.git/blob - Printer.php
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');
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)2005 - 2008, 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';
76 * The copyright string used in the footer
81 // ###################################################################
83 * Constructor (private)
85 private function __construct() {}
87 // ###################################################################
89 * Returns the singleton instance
91 * @return BSPrinter Singleton instance
93 private static function _instance()
97 self
::$instance = new BSPrinter();
99 return self
::$instance;
103 * Returns the copyright string
107 public static function get_copyright()
109 self
::_instance()->copyright
;
113 * Sets the copyright string
115 * @param string The copyright string
117 public static function set_copyright($copyright)
119 self
::_instance()->copyright
= $copyright;
122 // ###################################################################
126 * @return string Realm
128 public static function get_realm()
130 return self
::_instance()->realm
;
133 // ###################################################################
137 * @param string Realm
139 public static function set_realm($realm)
141 self
::_instance()->realm
= $realm;
144 // ###################################################################
146 * Returns the language array
148 * @return array Language array
150 public static function get_language_information()
152 return self
::_instance()->language
;
155 // ###################################################################
157 * Sets the language array information
159 * @param array Language array
161 public static function set_language_information($lang)
163 self
::_instance()->language
= $lang;
166 // ###################################################################
168 * Returns the stylesheet URL
170 * @return string Stylesheet link
172 public static function get_stylesheet()
174 return self
::_instance()->stylesheet
;
177 // ###################################################################
179 * Sets the path to the CSS style sheet
183 public static function set_stylesheet($stylesheet)
185 self
::_instance()->stylesheet
= $stylesheet;