MCMS
[ class tree: MCMS ] [ index: MCMS ] [ all elements ]

Source for file sitemap.php

Documentation is available at sitemap.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | MCMS: a PHP Content Management System for creating accessible sites. |
  5. // | Copyright (C) 2005  Silvio Moioli                                    |
  6. // |                                                                      |
  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; either version 2 of the License, or    |
  10. // | (at your option) any later version.                                  |
  11. // |                                                                      |
  12. // | This program is distributed in the hope that it will be useful,      |
  13. // | but WITHOUT ANY WARRANTY; without even the implied warranty of       |
  14. // | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the        |
  15. // | GNU General Public License for more details.                         |
  16. // |                                                                      |
  17. // | You should have received a copy of the GNU General Public License    |
  18. // | along with this program; if not, write to the Free Software          |
  19. // | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 |
  20. // +----------------------------------------------------------------------+
  21. // | Authors: Silvio Moioli <silvio at moioli dot net> www.moioli.net     |
  22. // +----------------------------------------------------------------------+
  23. //
  24. //$Id:
  25. /**
  26.  * Classe per la creazione della mappa di un sito gestito da MCMS.
  27.  *
  28.  * @package  MCMS
  29.  * @version  2
  30.  * @author   Silvio Moioli <silvio at moioli dot net>
  31.  */
  32.  
  33. /** Carica la classe base di MCMS per l'interfacciamento al Database */
  34. require_once $_SERVER["DOCUMENT_ROOT"]."/admin/lib/model/Engine.php";
  35. require_once $_SERVER["DOCUMENT_ROOT"]."/admin/lib/view/UserMap.php";
  36.  
  37. /**
  38.  * Classe per la creazione della mappa di un sito gestito da MCMS.
  39.  * Il componente č composto da questo file e dal file viewMap.php
  40.  * nella cartella principale del progetto.
  41.  *
  42.  * @package  MCMS
  43.  * @version  2
  44.  * @author   Silvio Moioli <silvio at moioli dot net>
  45.  */
  46. class sitemap extends Component
  47. {
  48.     /**
  49.      * Scritto solo per la concatenazione dei costruttori.
  50.      *
  51.      */
  52.     function MCMS_map(){
  53.         $this->Component();
  54.     }
  55.  
  56.     /**
  57.      * Ritorna il nome di questo componente.
  58.      *
  59.      * @return string il nome del componente
  60.      */
  61.     function getName(){
  62.         return "Mappa del sito";
  63.     }
  64.  
  65.     /**
  66.      *
  67.      * Questo componente non ha bisogno di inizializzazione,
  68.      * perciņ questo metodo č vuoto.
  69.      *
  70.      * @param Engine $engine il motore di MCMS
  71.      */
  72.     function init($engine){
  73.     }
  74.  
  75.     /**
  76.      *
  77.      * Aggiunge la voce di menu per la mappa del sito (a tutte le
  78.      * pagine).
  79.      *
  80.      * @param string $contents i contenuti della pagina da modificare
  81.      * @param array $menuEntries il menu della pagina
  82.      * @param string $title il titolo della pagina da modificare
  83.      * @param Site $site il sito corrente
  84.      */
  85.     function applyComponent(&$contents&$menuEntries&$title,
  86.         &$description$site){
  87.         $siteID $site->getID();
  88.         $menuEntries ["<p>Ti sei perso? Vai alla ".
  89.         "<a href=\"/mappa___$siteID.html\">Mappa del sito</a></p>";
  90.     }
  91.     
  92.     /**
  93.      * Salva la pagina XHTML della mappa del sito.
  94.      *
  95.      * @param Site $site il sito corrente
  96.      * @param Compiler $compiler l'oggetto per il salvataggio dei file
  97.      * @see Component
  98.      */
  99.     function saveFiles($site$compiler){
  100.         $compiler->save(new UserMap($site));
  101.     }
  102. }
  103. ?>

Documentation generated on Wed, 26 Jul 2006 21:44:58 +0200 by phpDocumentor 1.3.0RC6