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 http://nettephp.com
  12. 12:  *
  13. 13:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  14. 14:  * @license    http://nettephp.com/license  Nette license
  15. 15:  * @link       http://nettephp.com
  16. 16:  * @category   Nette
  17. 17:  * @package    Nette
  18. 18:  */
  19. 19:  
  20. 20:  
  21. 21:  
  22. 22: /**
  23. 23:  * The Nette Framework.
  24. 24:  *
  25. 25:  * @author     David Grudl
  26. 26:  * @copyright  Copyright (c) 2004, 2009 David Grudl
  27. 27:  * @package    Nette
  28. 28:  */
  29. 29: final class Framework
  30. 30: {
  31. 31:  
  32. 32:     /**#@+ Nette Framework version identification */
  33. 33:     const NAME 'Nette Framework';
  34. 34:  
  35. 35:     const VERSION '0.9.2';
  36. 36:  
  37. 37:     const REVISION 'c6b8124 released on 2009-11-12';
  38. 38:  
  39. 39:     const PACKAGE 'PHP 5.2';
  40. 40:     /**#@-*/
  41. 41:  
  42. 42:  
  43. 43:  
  44. 44:     /**
  45. 45:      * Static class - cannot be instantiated.
  46. 46:      */
  47. 47:     final public function __construct()
  48. 48:     {
  49. 49:         throw new LogicException("Cannot instantiate static class " get_class($this));
  50. 50:     }
  51. 51:  
  52. 52:  
  53. 53:  
  54. 54:     /**
  55. 55:      * Compares current Nette Framework version with given version.
  56. 56:      * @param  string 
  57. 57:      * @return int 
  58. 58:      */
  59. 59:     public static function compareVersion($version)
  60. 60:     {
  61. 61:         return version_compare($versionself::VERSION);
  62. 62:     }
  63. 63:  
  64. 64:  
  65. 65:  
  66. 66:     /**
  67. 67:      * Nette Framework promotion.
  68. 68:      * @return void 
  69. 69:      */
  70. 70:     public static function promo($xhtml TRUE)
  71. 71:     {
  72. 72:         echo '<a href="http://nettephp.com/" title="Nette Framework - The Most Innovative PHP Framework"><img ',
  73. 73:             'src="http://nettephp.com/images/nette-powered.gif" alt="Powered by Nette Framework" width="80" height="15"',
  74. 74:             ($xhtml ' />' '>')'</a>';
  75. 75:     }
  76. 76:  
  77. 77: }