public function getCallbackKey($callback)
    {
        if (is_array($callback)) {
            if (is_object($callback[0])) {
                $callback[0] = spl_object_hash($callback[0]);
            }
        } elseif ((function(){} instanceof $callback)) {
            $callback = spl_object_hash($callback);
        }

        return md5(serialize($callback));
    }