/** * Return string representation of current object. * * @return string String representation * @access public */ function toString($options = array()) { if (is_bool($options)) { $options = array('header' => $options); } $defaults = array('header' => false, 'encoding' => $this->encoding); $options = array_merge($defaults, Xml::options(), $options); $data = parent::toString($options, 0); if ($options['header']) { if (!empty($this->__header)) { return $this->header($this->__header) . "\n" . $data; } return $this->header() . "\n" . $data; } return $data; }