throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE);
} // END - if
}
+
+ /**
+ * Validates if the state is 'announcement_completed' or throws an
+ * exception if it is every other state.
+ *
+ * @return void
+ * @throws InvalidStateException If the state is not 'active' and not 'announced'
+ */
+ public function validateNodeStateIsAnnouncementCompleted () {
+ // Just compare it...
+ if (!$this instanceof NodeAnnouncementCompletedState) {
+ // Throw the exception
+ throw new InvalidStateException($this, self::EXCEPTION_INVALID_STATE);
+ } // END - if
+ }
}
// [EOF]