From 97a3c5354ab357b7b402d128e0b3b0ffe3c5df93 Mon Sep 17 00:00:00 2001 From: Robert Sesek Date: Mon, 25 Dec 2006 21:14:50 +0000 Subject: [PATCH] The constructor can now take a variable number of arguments as children --- PrinterTableElement.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/PrinterTableElement.php b/PrinterTableElement.php index 18a1702..6bf70c4 100644 --- a/PrinterTableElement.php +++ b/PrinterTableElement.php @@ -53,6 +53,22 @@ class BSPrinterTableElement extends BSPrinterElement */ private $colspan = 0; + // ################################################################### + /** + * Creates a table element; takes a variable number of arguments which + * are added as children in the order passed + * + * @param BSPrinterTableElement... Variable number (or no) children + */ + public function __construct() + { + $childs = func_get_args(); + if (is_array($childs)) + { + $this->children = $childs; + } + } + // ################################################################### /** * Prints a simple row of text and text -- 2.43.5