public function connect($signalClassName, $signalName, $slotClassNameOrObject, $slotMethodName = '', $passSignalInformation = true)
    {
        $class = null;
        $object = null;

        if (strpos($signalName, 'emit') === 0) {
            $possibleSignalName = lcfirst(substr($signalName, strlen('emit')));
            throw new \InvalidArgumentException('The signal should not be connected with the method name ("' . $signalName . '"). Try "' . $possibleSignalName . '" for the signal name.', 1314016630);
        }

        if (is_object($slotClassNameOrObject)) {
            $object = $slotClassNameOrObject;
            $method = ($slotClassNameOrObject instanceof \Closure) ? '__invoke' : $slotMethodName;
        } else {
            if ($slotMethodName === '') {
                throw new \InvalidArgumentException('The slot method name must not be empty (except for closures).', 1229531659);
            }
            $class = $slotClassNameOrObject;
            $method = $slotMethodName;
        }

        $this->slots[$signalClassName][$signalName][] = [
            'class' => $class,
            'method' => $method,
            'object' => $object,
            'passSignalInformation' => ($passSignalInformation === true)
        ];
    }