PageRenderTime 43ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/content/code/trunk/administrator/components/com_artofcontent/version.php

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