public function addNotificationListener($notification_type, $notification_callback)
    {
        if (!NotificationType::isNotificationTypeValid($notification_type)) {
            $this->_logger->log(Logger::ERROR, "Invalid notification type.");
            $this->_errorHandler->handleError(new InvalidNotificationTypeException('Invalid notification type.'));
            return null;
        }

        if (!is_callable($notification_callback)) {
            $this->_logger->log(Logger::ERROR, "Invalid notification callback.");
            return null;
        }

        foreach (array_values($this->_notifications[$notification_type]) as $callback) {
            if ($notification_callback == $callback) {
                // Note: anonymous methods sent with the same body will be re-added.
                // Only variable and object methods can be checked for duplication
                $this->_logger->log(Logger::DEBUG, "Callback already added for notification type '{$notification_type}'.");
                return -1;
            }
        }

        $this->_notifications[$notification_type][$this->_notificationId] = $notification_callback;
        $this->_logger->log(Logger::INFO, "Callback added for notification type '{$notification_type}'.");
        $returnVal = $this->_notificationId++;
        return $returnVal;
    }