Source for file Framework.php

Documentation is available at Framework.php

  1. 1: <?php
  2. 2:  
  3. 3: /**
  4. 4:  * Nette Framework
  5. 5:  *
  6. 6:  * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
  7. 7:  *
  8. 8:  * This source file is subject to the "Nette license" that is bundled
  9. 9:  * with this package in the file license.txt.
  10. 10:  *
  11. 11:  * For more information please see https://nette.org
  12. 12:  *
  13. 13:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  14. 14:  * @license    https://nette.org/license  Nette license
  15. 15:  * @link       https://nette.org
  16. 16:  * @category   Nette
  17. 17:  * @package    Nette
  18. 18:  * @version    $Id$
  19. 19:  */
  20. 20:  
  21. 21:  
  22. 22:  
  23. 23: /**
  24. 24:  * The Nette Framework.
  25. 25:  *
  26. 26:  * @author     David Grudl
  27. 27:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  28. 28:  * @package    Nette
  29. 29:  */
  30. 30: final class Framework
  31. 31: {
  32. 32:  
  33. 33:     /**#@+ Nette Framework version identification */
  34. 34:     const NAME 'Nette Framework';
  35. 35:  
  36. 36:     const VERSION '0.8';
  37. 37:  
  38. 38:     const REVISION '1d6f3c5 released on 2009-11-10';
  39. 39:     /**#@-*/
  40. 40:  
  41. 41:  
  42. 42:  
  43. 43:     /**
  44. 44:      * Static class - cannot be instantiated.
  45. 45:      */
  46. 46:     final public function __construct()
  47. 47:     {
  48. 48:         throw new LogicException("Cannot instantiate static class " get_class($this));
  49. 49:     }
  50. 50:  
  51. 51:  
  52. 52:  
  53. 53:     /**
  54. 54:      * Compares current Nette Framework version with given version.
  55. 55:      * @param  string 
  56. 56:      * @return int 
  57. 57:      */
  58. 58:     public static function compareVersion($version)
  59. 59:     {
  60. 60:         return version_compare($versionself::VERSION);
  61. 61:     }
  62. 62:  
  63. 63:  
  64. 64:  
  65. 65:     /**
  66. 66:      * Nette Framework promotion.
  67. 67:      * @return void 
  68. 68:      */
  69. 69:     public static function promo($xhtml TRUE)
  70. 70:     {
  71. 71:         echo '<a href="https://nette.org/" title="Nette Framework - The Most Innovative PHP Framework"><img ',
  72. 72:             'src="https://nette.org/images/nette-powered.gif" alt="Powered by Nette Framework" width="80" height="15"',
  73. 73:             ($xhtml ' />' '>')'</a>';
  74. 74:     }
  75. 75:  
  76. 76: }