function toString() { $scripts = ''; if (!empty($this->_scripts)) { foreach ($this->_scripts as $script) { $scripts .= chr(13) . '<script type="text/javascript" src="' . $script . '"></script>'; } } if (!empty($this->_data)) { $js = implode(chr(13), $this->_data); if ($this->_minify) { include_once 'javascript/jsmin.php'; $js = JCKSMin::minify($js); } $scripts .= chr(13) . '<script type="text/javascript">' . $js . chr(13) . '</script>'; } return $scripts; }