[ Index ] |
|
Code source de LifeType 1.2.4 |
1 <?php 2 3 lt_include( PLOG_CLASS_PATH."class/config/config.class.php" ); 4 5 /** 6 * some default values for the method below 7 */ 8 define( "DEFAULT_TMP_FOLDER", "./tmp" ); 9 define( "DEFAULT_HARD_SHOW_POSTS_MAX", 50 ); 10 define( "DEFAULT_HARD_RECENT_POSTS_MAX", 25 ); 11 define( "DEFAULT_HARD_SHOW_COMMENTS_MAX", 20 ); 12 13 class SiteConfig extends Config 14 { 15 function _getConfigValueWithDefault( $key, $default ) 16 { 17 $config =& Config::getConfig(); 18 return( $config->getValue( $key, $default )); 19 } 20 21 /** 22 * @static 23 * Returns the temporaray folder 24 */ 25 function getTempFolder() 26 { 27 return( SiteConfig::_getConfigValueWithDefault( "temp_folder", DEFAULT_TMP_FOLDER )); 28 } 29 30 /** 31 * @static 32 * Returns the maximum value for the hard_show_posts_max key 33 */ 34 function getHardShowPostsMax() 35 { 36 return( SiteConfig::_getConfigValueWithDefault( "hard_show_posts_max", DEFAULT_HARD_SHOW_POSTS_MAX )); 37 } 38 39 /** 40 * @static 41 * Returns the maximum value for the hard_recent_posts_max key 42 */ 43 function getHardRecentPostsMax() 44 { 45 return( SiteConfig::_getConfigValueWithDefault( "hard_recent_posts_max", DEFAULT_HARD_RECENT_POSTS_MAX )); 46 } 47 48 /** 49 * @static 50 * Returns the maximum value for the hard_recent_posts_max key 51 */ 52 function getHardShowCommentsMax() 53 { 54 return( SiteConfig::_getConfigValueWithDefault( "hard_show_comments_max", DEFAULT_HARD_SHOW_COMMENTS_MAX )); 55 } 56 57 /** 58 * @static 59 * @see Config 60 */ 61 function getValue( $key, $default ) 62 { 63 $config =& parent::getConfig(); 64 return( $config->getValue( $key, $default )); 65 } 66 } 67 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Mon Nov 26 21:04:15 2007 | par Balluche grâce à PHPXref 0.7 |
![]() |