PageRenderTime 93ms CodeModel.GetById 43ms RepoModel.GetById 24ms app.codeStats 0ms

/Nette/Framework.php

https://github.com/DocX/nette
PHP | 79 lines | 22 code | 19 blank | 38 comment | 0 complexity | b3630b08a465332f44deb4d1ce60390a MD5 | raw file
Possible License(s): BSD-3-Clause
  1. <?php
  2. /**
  3. * Nette Framework
  4. *
  5. * Copyright (c) 2004, 2009 David Grudl (http://davidgrudl.com)
  6. *
  7. * This source file is subject to the "Nette license" that is bundled
  8. * with this package in the file license.txt.
  9. *
  10. * For more information please see http://nettephp.com
  11. *
  12. * @copyright Copyright (c) 2004, 2009 David Grudl
  13. * @license http://nettephp.com/license Nette license
  14. * @link http://nettephp.com
  15. * @category Nette
  16. * @package Nette
  17. */
  18. /*namespace Nette;*/
  19. /**
  20. * The Nette Framework.
  21. *
  22. * @author David Grudl
  23. * @copyright Copyright (c) 2004, 2009 David Grudl
  24. * @package Nette
  25. */
  26. final class Framework
  27. {
  28. /**#@+ Nette Framework version identification */
  29. const NAME = 'Nette Framework';
  30. const VERSION = '0.9.2-dev';
  31. const REVISION = '$WCREV$ released on $WCDATE$';
  32. const PACKAGE = '';
  33. /**#@-*/
  34. /**
  35. * Static class - cannot be instantiated.
  36. */
  37. final public function __construct()
  38. {
  39. throw new /*\*/LogicException("Cannot instantiate static class " . get_class($this));
  40. }
  41. /**
  42. * Compares current Nette Framework version with given version.
  43. * @param string
  44. * @return int
  45. */
  46. public static function compareVersion($version)
  47. {
  48. return version_compare($version, self::VERSION);
  49. }
  50. /**
  51. * Nette Framework promotion.
  52. * @return void
  53. */
  54. public static function promo($xhtml = TRUE)
  55. {
  56. echo '<a href="http://nettephp.com/" title="Nette Framework - The Most Innovative PHP Framework"><img ',
  57. 'src="http://nettephp.com/images/nette-powered.gif" alt="Powered by Nette Framework" width="80" height="15"',
  58. ($xhtml ? ' />' : '>'), '</a>';
  59. }
  60. }