Source for file sylar.php

Documentation is available at sylar.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.  
  25. /**
  26. * Sylar - Framework Base Settings
  27. * Contains framework settings, constants and init instructions
  28. *
  29. * @package Sylar
  30. * @version 1.0
  31. * @since 02-2008
  32. * @author Gianluca Giusti [brdp] <g.giusti@giano-solutions.com>
  33. * @copyright Sylar Development Team
  34. */
  35.  
  36. #
  37. # Controls that the file is always included
  38. #
  39.  
  40. if( count(get_included_files())<=1 ){
  41. echo "Wrong Call. Sylar Die.";
  42. exit;
  43. }
  44.  
  45. define('SYLAR_VERSION','0.3.1');
  46.  
  47.  
  48.  
  49. /**
  50. * System Constant
  51. * Costanti Necessarie al funzionamento di Sylar e dell'applicazione
  52. * Vengono definite nel file di configurazione dell'applicazione che utilizza il framework.
  53. *
  54. * @see appConfig.php
  55. *
  56. * define('SYLAR_APPLICATION_NAME', "sylarExampleApp/");
  57. * define('SYLAR_FOLDER_NAME', "sylar/");
  58. * define('SYLAR_APPLICATION_ROOT_URL', 'http://'.$_SERVER["SERVER_NAME"].':'.$_SERVER["SERVER_PORT"].'/'.SYLAR_APPLICATION_NAME);
  59. * define('SYLAR_APPLICATION_ROOT_FS', ''.$_SERVER["DOCUMENT_ROOT"].'/'.SYLAR_APPLICATION_NAME);
  60. * define('SYLAR_ROOT_URL', SYLAR_APPLICATION_ROOT_URL.SYLAR_FOLDER_NAME);
  61. * define('SYLAR_ROOT_FS', SYLAR_APPLICATION_ROOT_FS.SYLAR_FOLDER_NAME);
  62. */
  63.  
  64.  
  65. /**
  66. * Database Connection Config
  67. * Define all DB used in the application with Sylar and relative parameters.
  68. * Which one db is used by default from the list above
  69. *
  70. * @see appConfig.php
  71. *
  72. * Usually is defined in the application config file
  73. */
  74. //$SYLAR_DB["develop"] = array('username' => 'sylar', 'password' => 'sylar', 'schema' => 'sylarExampleDB', 'host'=> 'localhost', 'driver'=>'mysql');
  75. //$SYLAR_DB["test"] = array('username' => 'db_user', 'password' => 'db_pwd', 'schema' => 'db_name', 'host'=> 'localhost', 'driver'=>'mysql');
  76. //$SYLAR_DB["production"] = array('username' => 'db_user', 'password' => 'db_pwd', 'schema' => 'db_name', 'host'=> 'localhost', 'driver'=>'mysql');
  77.  
  78. //define('SYLAR_USED_DB', 'develop');
  79.  
  80.  
  81.  
  82.  
  83.  
  84. /** Switch Sylar in Debug mode */
  85.  
  86. define('SYLAR_DEBUG_MODE', true);
  87.  
  88.  
  89. /** Sylar default locale set */
  90.  
  91. define('SYLAR_DEFAULT_LOCALE', 'en_EN');
  92.  
  93.  
  94. /** Sylar default Character set */
  95.  
  96. define('SYLAR_DEFAULT_CHARSET', 'UTF-8');
  97.  
  98.  
  99. /** Sylar default layout template name */
  100.  
  101. define('SYLAR_DEFAULT_LAYOUTNAME', 'default');
  102.  
  103.  
  104. /**
  105. * Set the level of event log
  106. * It can be one of them:
  107. * - DEBUG
  108. * - VERBOSE
  109. * - NORMAL
  110. * - WARNING
  111. * - FATAL
  112. * - NO_LOG
  113. */
  114. define('SYLAR_LOG_LEVEL', 'VERBOSE');
  115.  
  116.  
  117. /**
  118. * Set the PHP Session Name
  119. * Is the name that PHP set on server to storage information in session
  120. *
  121. * if you don't need a web session set it to false like:
  122. * define('SYLAR_SESSION_NAME', false);
  123. */
  124. define('SYLAR_SESSION_NAME', 'SYLAR_SESSION');
  125.  
  126.  
  127. /**
  128. * Sylar Settings folder
  129. * Define the path of Sylar folder that contains settings files.
  130. */
  131. define('SYLAR_SETTINGS_FS', SYLAR_ROOT_FS.'settings/');
  132.  
  133.  
  134. /**
  135. * Root Classes
  136. * The root of class directory and files
  137. */
  138. define('SYLAR_CLASSES_ROOT_FS', SYLAR_ROOT_FS.'classes/');
  139.  
  140.  
  141.  
  142. ?>

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