, 'direction' =>, 'charset' =>) * @var array */ private $language = array('langcode' => 'en_US', 'direction' => 'ltr', 'charset' => 'utf-8'); /** * The CSS stylesheet * @var string */ private $stylesheet; /** * Constructor * * @param BSPrinter Printer object * @param string Page title */ function __construct($printer, $title) { $this->title = $title; parent::__construct($printer); } // ################################################################### /** * Sets the language array information * * @param array Language array */ public function setLanguageInformation($lang) { $this->language = $lang; } // ################################################################### /** * Sets the path to the CSS style sheet * * @param string Path */ public function setStylesheet($stylesheet) { $this->stylesheet = $stylesheet; } // ################################################################### /** * Sets the parent element */ public function setParent(BSPrinterElement $parent) { trigger_error('Cannot set the parent element on a BSPrinterRootElement'); } // ################################################################### /** * Gets the parent element (none exist as this is the root element) */ public function getParent() { return null; } // ################################################################### /** * Returns the HTML for all printed children elements * * @return string Printed HTML */ protected function _paintChildren() { $builder = ''; foreach ($this->children AS $child) { $this->builder .= "\n" . $child->paint() . "\n"; } return $this->builder; } // ################################################################### /** * Tells the element to paint itself (and any children) */ public function paint() { $this->printer->paint("\n"); $this->printer->paint("language['langcode'] . "\" lang=\"" . $this->language['langcode'] . "\" dir=\"" . $this->language['direction'] . "\">\n
"); $this->printer->paint("\n\t