1 <?php /* vim: set binary expandtab tabstop=4 shiftwidth=4 textwidth=80:
2 -------------------------------------------------------------------------------
5 -------------------------------------------------------------------------------
6 This file is part of meconlib.
8 meconlib is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 2 of the License, or (at your option)
13 meconlib is distributed in the hope that it will be useful, but WITHOUT
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15 FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License; if not,
18 write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
19 Boston, MA 02111-1307 USA
20 -------------------------------------------------------------------------------
21 Creado: vie mar 19 14:50:53 ART 2004
22 Autor: Martin Marrese <mmarre@mecon.gov.ar>
23 -------------------------------------------------------------------------------
25 -----------------------------------------------------------------------------*/
27 require_once 'HTML/Page.php';
30 * Clase para crear paginas sin tener que utilizar MECON_Marco.
31 * Obtiene los css de los objetos que se le agregan
35 class MECON_HTML_Page extends HTML_Page {
43 function MECON_HTML_Page() // ~X2C
47 'doctype' => 'HTML 4.01 Transitional',
48 'charset' => 'iso-8859-1',
58 * Redefinicion de la funcion que permite agregar objetos o html al body de
60 * Si es un objeto debe tener un metodo toHtml y opcionalmente puede tener
63 * @param mixed $content Contenido a agregar en la pagina
68 function addBodyContent($content)
70 if ((is_object($content)) && (method_exists($content, 'getcss'))) {
71 $this->addStyleSheet($content->getCSS());
73 parent::addBodyContent($content);
77 * Muestra un error a través y termina el programa.
81 require_once 'MECON/HTML/Error.php';
82 $this->addBodyContent(new MECON_HTML_Error($msg));