type = $type; $this->message = $message; } /** * Get the license status type. * * @since 0.9 * @return string */ public function get_type() { return $this->type; } /** * Check if the license status type is valid. * * @since 0.9 * @return bool */ public function is_valid() { return $this->type == self::VALID; } /** * Check if the license status type is valid. * * @since 0.9 * @return bool */ public function is_invalid() { return $this->type == self::INVALID; } /** * Check if the license status type is missing. * * @since 0.9 * @return bool */ public function is_missing() { return $this->type == self::MISSING; } /** * Check if the license status type is indicating a success. * * @since 0.9 * @return bool */ public function is_success() { return $this->type == self::SUCCESS; } /** * Check if the license status type is indicating an error. * * @since 0.9 * @return bool */ public function is_error() { return $this->type == self::ERROR; } /** * Check if the license status has an message. * * @since 0.9 * @return bool */ public function has_message() { return $this->message !== null; } /** * Get the license status message. * * @since 0.9 * @return null|string */ public function get_message() { return $this->message; } }