PageRenderTime 48ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/redirect/code/trunk/administrator/components/com_redirect/version.php

https://bitbucket.org/eddieajau/the-art-of-joomla-archive
PHP | 103 lines | 26 code | 11 blank | 66 comment | 2 complexity | 3319e4c07133b8d5a94507fc37808727 MD5 | raw file
  1. <?php
  2. /**
  3. * @version $Id: version.php 400 2010-11-08 03:54:47Z eddieajau $
  4. * @package NewLifeInIT
  5. * @subpackage com_redirect
  6. * @copyright Copyright 2005 - 2010 New Life in IT Pty Ltd. All rights reserved.
  7. * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
  8. * @link http://www.theartofjoomla.com
  9. */
  10. defined('_JEXEC') or die;
  11. /**
  12. * Finder Version Object
  13. *
  14. * @package NewLifeInIT
  15. * @subpackage com_redirect
  16. * @since 1.0
  17. */
  18. final class RedirectVersion
  19. {
  20. /**
  21. * Extension name string.
  22. *
  23. * @var string
  24. * @since 1.0
  25. */
  26. const EXTENSION = 'com_redirect';
  27. /**
  28. * Major.Minor version string.
  29. *
  30. * @var string
  31. * @since 1.0
  32. */
  33. const VERSION = '1.0';
  34. /**
  35. * Maintenance version string.
  36. *
  37. * @var string
  38. * @since 1.0
  39. */
  40. const SUBVERSION = '2';
  41. /**
  42. * Version status string.
  43. *
  44. * @var string
  45. * @since 1.0
  46. */
  47. const STATUS = '';
  48. /**
  49. * Version release time stamp.
  50. *
  51. * @var string
  52. * @since 1.0
  53. */
  54. const DATE = '2010-11-08 00:00:00';
  55. /**
  56. * Source control revision string.
  57. *
  58. * @var string
  59. * @since 1.0
  60. */
  61. const REVISION = '$Revision: 400 $';
  62. /**
  63. * Method to get the build number from the source control revision string.
  64. *
  65. * @return integer The version build number.
  66. * @since 1.0
  67. */
  68. public static function getBuild()
  69. {
  70. return intval(substr(self::REVISION, 11));
  71. }
  72. /**
  73. * Gets the version number.
  74. *
  75. * @param boolean $build Optionally show the build number.
  76. * @param boolean $status Optionally show the status string.
  77. *
  78. * @return string
  79. * @since 1.0.3
  80. */
  81. public static function getVersion($build = false, $status = false)
  82. {
  83. $text = self::VERSION.'.'.self::SUBVERSION;
  84. if ($build) {
  85. $text .= ':'.self::getBuild();
  86. }
  87. if ($status) {
  88. $text .= ' '.self::STATUS;
  89. }
  90. return $text;
  91. }
  92. }