1
0

BxBaseConfig.php 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup DolphinCore Dolphin Core
  7. * @{
  8. */
  9. class BxBaseConfig extends BxDol implements iBxDolSingleton {
  10. protected $_aConfig = array (
  11. 'iTagsMinFontSize' => 10, // minimal font size of tag
  12. 'iTagsMaxFontSize' => 30, // maximal font size of tag
  13. 'bAllowUnicodeInPreg' => false, // allow unicode in regular expressions
  14. 'aLessConfig' => array (
  15. 'bx-margin' => '20px',
  16. 'bx-margin-sec' => '10px',
  17. 'bx-margin-thd' => '5px',
  18. 'bx-padding' => '20px',
  19. 'bx-padding-sec' => '10px',
  20. 'bx-padding-thd' => '5px',
  21. 'bx-font-family' => '"Helvetica Neue", Helvetica, Arial, "Lucida Grande", sans-serif',
  22. 'bx-size-avatar' => '96px',
  23. 'bx-size-thumb' => '48px',
  24. 'bx-size-icon' => '32px',
  25. 'bx-color-page' => '#fff',
  26. 'bx-color-block' => '#fff',
  27. 'bx-color-box' => '#fff',
  28. 'bx-color-sec' => '#f2f2f2',
  29. 'bx-color-hl' => 'rgba(196, 248, 156, 0.2)',
  30. 'bx-color-active' => 'rgba(196, 248, 156, 0.4)',
  31. 'bx-border-width' => '1px',
  32. 'bx-border-type' => 'solid',
  33. 'bx-border-color' => '#d0d0d0',
  34. 'bx-font-size-default' => '16px',
  35. 'bx-font-size-small' => '12px',
  36. 'bx-font-size-middle' => '14px',
  37. 'bx-font-size-large' => '18px',
  38. 'bx-font-size-h1' => '24px',
  39. 'bx-font-size-h2' => '20px',
  40. 'bx-font-size-h3' => '16px',
  41. 'bx-font-color-default' => '#333',
  42. 'bx-font-color-grayed' => '#999',
  43. 'bx-font-color-contrasted' => '#fff',
  44. 'bx-round-corners-radius' => '3px',
  45. ),
  46. );
  47. function __construct()
  48. {
  49. parent::__construct();
  50. }
  51. public static function getInstance()
  52. {
  53. if(!isset($GLOBALS['bxDolClasses'][__CLASS__]))
  54. $GLOBALS['bxDolClasses'][__CLASS__] = new BxTemplConfig();
  55. return $GLOBALS['bxDolClasses'][__CLASS__];
  56. }
  57. public function __get($sName)
  58. {
  59. if (array_key_exists($sName, $this->_aConfig))
  60. return $this->_aConfig[$sName];
  61. trigger_error('Undefined property "' . $aName . '" in ' . get_class($this), E_USER_ERROR);
  62. return null;
  63. }
  64. public function __isset($sName)
  65. {
  66. return isset($this->_aConfig[$sName]);
  67. }
  68. }
  69. /** @} */