Adding a bunch of new Printer stuff that I'm not sure works quite yet
[isso.git] / PrinterRootElement.php
1 <?php
2 /*=====================================================================*
3 || ###################################################################
4 || # Blue Static ISSO Framework [#]issoversion[#]
5 || # Copyright ©2002-[#]year[#] Blue Static
6 || #
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.
10 || #
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
14 || # more details.
15 || #
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 \*=====================================================================*/
21
22 /**
23 * Printer Root Element (PrinterRootElement.php)
24 *
25 * @package ISSO
26 */
27
28 require_once('ISSO/PrinterElement.php');
29
30 /**
31 * Printer Root Element
32 *
33 * This is a root element class. That means that elements can be printed
34 * directly into this and this can stand alone as a page. However, that
35 * does not mean that all root elements produce valid XHTML.
36 *
37 * @author Blue Static
38 * @copyright Copyright (c)2002 - [#]year[#], Blue Static
39 * @version $Revision$
40 * @package ISSO
41 *
42 */
43 abstract class BSPrinterRootElement extends BSPrinterElement
44 {
45 /**
46 * Child elements
47 * @var string
48 */
49 protected $children = array();
50
51 // ###################################################################
52 /**
53 * Constructor
54 *
55 * @param BSPrinter Print stream wrapper
56 */
57 public function __construct($printer)
58 {
59 $this->printer = $printer;
60 }
61
62 /**
63 * Returns all of the children painted in the right order
64 */
65 protected abstract function _paintChildren();
66
67 // ###################################################################
68 /**
69 * Adds a child node to the element
70 *
71 * @param BSPrinterElement A child element
72 */
73 public function addChild(BSPrinterElement $child)
74 {
75 $this->children[] = $child;
76 }
77 }
78
79 /*=====================================================================*
80 || ###################################################################
81 || # $HeadURL$
82 || # $Id$
83 || ###################################################################
84 \*=====================================================================*/
85 ?>