/www/libs/nette-dev/Framework.php
PHP | 82 lines | 30 code | 20 blank | 32 comment | 1 complexity | a7b71406003e6b0929bdc6945e845c84 MD5 | raw file
Possible License(s): BSD-3-Clause, MIT
- <?php
- /**
- * Nette Framework
- *
- * @copyright Copyright (c) 2004, 2010 David Grudl
- * @license http://nettephp.com/license Nette license
- * @link http://nettephp.com
- * @category Nette
- * @package Nette
- */
- /**
- * The Nette Framework.
- *
- * @copyright Copyright (c) 2004, 2010 David Grudl
- * @package Nette
- */
- final class Framework
- {
- /**#@+ Nette Framework version identification */
- const NAME = 'Nette Framework';
- const VERSION = '1.0-dev';
- const REVISION = '7504d94 released on 2010-04-06';
- const PACKAGE = 'PHP 5.2';
- /**#@-*/
- /**
- * Static class - cannot be instantiated.
- */
- final public function __construct()
- {
- throw new LogicException("Cannot instantiate static class " . get_class($this));
- }
- /**
- * Compares current Nette Framework version with given version.
- * @param string
- * @return int
- */
- public static function compareVersion($version)
- {
- return version_compare($version, self::VERSION);
- }
- /**
- * Nette Framework promotion.
- * @return void
- */
- public static function promo($xhtml = TRUE)
- {
- echo '<a href="http://nettephp.com/" title="Nette Framework - The Most Innovative PHP Framework"><img ',
- 'src="http://nettephp.com/images/nette-powered.gif" alt="Powered by Nette Framework" width="80" height="15"',
- ($xhtml ? ' />' : '>'), '</a>';
- }
-
- /**
- * Fixes namespaced class/interface in PHP < 5.3
- */
- public static function fixNamespace(& $class)
- {
- if ($a = strrpos($class, '\\')) {
- $class = substr($class, $a + 1);
- }
- }
-
- }