diff --git a/src/VersionComponent.php b/src/VersionComponent.php index aafe6c4..1779257 100644 --- a/src/VersionComponent.php +++ b/src/VersionComponent.php @@ -21,8 +21,8 @@ /** * Representa un componente de un nĂºmero de Version. * Extiende la clase IntString, pero restringe los valores que puede tomar. - * - * + * + * * @package NelsonMartell * @author Nelson Martell (@yahoo.es: nelson6e65-dev) * */ @@ -78,5 +78,30 @@ public static function Parse($value) { return $r; } + /** + * Determina si este componente tiene los valores predeterminados (0). + * + * + * @return boolean + * */ + public function IsDefault() { + if ($this->IntValue == 0){ + if ($this->StringValue == '') { + return true; + } + } + + return false; + } + + /** + * Determina si este componente NO tiene los valores predeterminados. + * + * + * @return boolean + * */ + public function IsNotDefault() { + return !$this->IsDefault(); + } } }