2 /*=====================================================================*
3 || ###################################################################
4 || # Blue Static ISSO Framework [#]version[#]
5 || # Copyright ©2002-[#]year[#] 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 [#]gpl[#] 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 Element Abstract Class (PrinterElement.php)
31 * This abstract class is used for all printer elements and describes
32 * the basic functionality of an element.
35 * @copyright Copyright (c)2002 - [#]year[#], Blue Static
40 abstract class BSPrinterElement
46 protected $style = array();
49 * Tells the element to paint itself (and any children)
51 public abstract function paint();
53 // ###################################################################
55 * Sets the style information
57 public function setStyle(Array $attributes)
59 $this->style
= $attributes;
62 // ###################################################################
64 * Returns a string of CSS style attributes
66 * @return string CSS attributes
68 protected function _prepareStyle()
70 if (empty($this->style
))
77 foreach ($this->style
AS $prop => $value)
79 $attrs[] = $prop . ': ' . $value;
82 return explode('; ', $attrs);
86 /*=====================================================================*
87 || ###################################################################
90 || ###################################################################
91 \*=====================================================================*/