VersionNumber.php 802 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. <?php
  2. /*
  3. * This file is part of PharIo\Version.
  4. *
  5. * (c) Arne Blankerts <arne@blankerts.de>, Sebastian Heuer <sebastian@phpeople.de>, Sebastian Bergmann <sebastian@phpunit.de>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace PharIo\Version;
  11. class VersionNumber {
  12. /**
  13. * @var int
  14. */
  15. private $value;
  16. /**
  17. * @param mixed $value
  18. */
  19. public function __construct($value) {
  20. if (is_numeric($value)) {
  21. $this->value = $value;
  22. }
  23. }
  24. /**
  25. * @return bool
  26. */
  27. public function isAny() {
  28. return $this->value === null;
  29. }
  30. /**
  31. * @return int
  32. */
  33. public function getValue() {
  34. return $this->value;
  35. }
  36. }