PageRenderTime 47ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/googlemini/code/trunk/administrator/components/com_artofgm/version.php

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