Source for file Format.php

Documentation is available at Format.php

  1. <?php
  2. /*
  3. * This file is part of Sylar.
  4. *
  5. * Sylar is free software: you can redistribute it and/or modify
  6. * it under the terms of the GNU Lesser General Public License as published by
  7. * the Free Software Foundation, either version 3 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * Sylar is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU Lesser General Public License for more details.
  14. *
  15. * You should have received a copy of the GNU Lesser General Public License
  16. * along with Sylar. If not, see <http://www.gnu.org/licenses/>.
  17. *
  18. * @copyright Copyright Sylar Development Team
  19. * @license http://www.gnu.org/licenses/ GNU Public License V2.0
  20. * @see https://launchpad.net/sylar/
  21. * @see http://www.giano-solutions.com
  22. */
  23.  
  24. import('sylar.presentation.Format');
  25. import('sylar.presentation.html.HtmlPage');
  26.  
  27.  
  28. /**
  29. * Main Format Class for Application
  30. *
  31. * Main Class for formatting output in your Application.
  32. * Every classes used to format page and html in your application must extend this class
  33. *
  34. * @package Sylar
  35. * @version 1.0
  36. * @since 05/mar/08
  37. *
  38. * @author Gianluca Giusti [brdp] <g.giusti@giano-solutions.com>
  39. * @copyright Sylar Development Team
  40. */
  41. class App_Format extends Sylar_Format{
  42. function __construct(){
  43. parent::__construct();
  44. }
  45. function __destruct(){
  46. // nothing to do at the moment
  47. }
  48. // Public Methods
  49. //__________________________________________________________________________
  50. /**
  51. * Return Head
  52. *
  53. *
  54. * @return Sylar_HtmlHead
  55. * @param string $sTitle
  56. */
  57. public function provideStandardHeader($sTitle=APP_HTML_TITLE){
  58. try {
  59. $oHH = new Sylar_HtmlHead($sTitle);
  60. $oHH->addMetaTag("text/html; charset=".APP_DEFAULT_CHARSET, null, "content-type");
  61. $oHH->addMetaTag("Brdp - Giano Solutions", "Author");
  62. $oHH->addMetaTag("Sylar, Example App", "Keywords");
  63. $oHH->addMetaTag("width=1024", "viewport");
  64. $oHH->addMetaTag("no-cache", null, "pragma");
  65. $oHH->setAppCssUrlRoot(APP_LAYOUT_CSS_URL_ROOT);
  66. $oHH->addApplicationStyle("mainGiano.css");
  67. $oHH->setAppJsUrlRoot(APP_JAVASCRIPT_URL_ROOT);
  68. $oHH->addApplicationJavascript("mainGiano.js");
  69. return $oHH;
  70. }catch (ExceptionInSylar $ex){
  71. throw $ex;
  72. return null;
  73. }
  74. }
  75.  
  76. }
  77. ?>

Documentation generated on Thu, 24 Apr 2008 16:14:14 +0200 by phpDocumentor 1.3.0RC3