]> src.bluestatic.org Git - isso.git/blob - PrinterRootAbstract.php
Update version number
[isso.git] / PrinterRootAbstract.php
1 <?php
2 /*=====================================================================*
3 || ###################################################################
4 || # Blue Static ISSO Framework
5 || # Copyright (c)2005-2008 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 2 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 (PrinterRootAbstract.php)
24 *
25 * @package ISSO
26 */
27
28 require_once(ISSO . '/PrinterAbstract.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)2005 - 2008, Blue Static
39 * @package ISSO
40 *
41 */
42 abstract class BSPrinterRootAbstract extends BSPrinterAbstract
43 {
44 /**
45 * Child elements
46 * @var string
47 */
48 protected $children = array();
49
50 /**
51 * Returns all of the children painted in the right order
52 */
53 protected abstract function _paintChildren();
54
55 /**
56 * Adds a child node to the element
57 *
58 * @param BSPrinterAbstract A child element
59 *
60 * @return fluent interface
61 */
62 public function addChild(BSPrinterAbstract $child)
63 {
64 $this->children[] = $child;
65 return $this;
66 }
67 }
68
69 ?>