static public function handle($child)
    {
        $_instances = 'empty';

        $id = '';
        $element = '';

        // Id verification in the returned stanza
        if(in_array($child->getName(), ['iq', 'presence', 'message'])) {
            $id = (string)$child->attributes()->id;
        }

        $sess = Session::start();

        if(
            ($id != '' &&
            $sess->get($id) == false) ||
            $id == ''
          ) {
            Utils::log("Handler : Memory instance not found for {$id}");
            Utils::log('Handler : Not an XMPP ACK');

            Handler::handleNode($child);

            foreach($child->children() as $s1) {
                Handler::handleNode($s1, $child);
                foreach($s1->children() as $s2) {
                    Handler::handleNode($s2, $child);
                }
            }
        } elseif(
            $id != '' &&
            $sess->get($id) != false
        ) {
            // We search an existent instance
            Utils::log("Handler : Memory instance found for {$id}");
            $instance = $sess->get($id);

            $action = unserialize($instance->object);

            $error = false;

            // Handle specific query error
            if($child->query->error)
                $error = $child->query->error;
            elseif($child->error)
                $error = $child->error;

            // XMPP returned an error
            if($error) {
                $errors = $error->children();

                $errorid = Handler::formatError($errors->getName());

                $message = false;

                if($error->text)
                    $message = (string)$error->text;

                Utils::log('Handler : '.get_class($action).' '.$id.' - '.$errorid);

                /* If the action has defined a special handler
                 * for this error
                 */
                if(method_exists($action, $errorid)) {
                    $action->method($errorid);
                    $action->$errorid($errorid, $message);
                }
                // We also call a global error handler
                if(method_exists($action, 'error')) {
                    Utils::log('Handler : Global error - '.$id.' - '.$errorid);
                    $action->method('error');
                    $action->error($errorid, $message);
                }
            } else {
                // We launch the object handle
                $action->method('handle');
                $action->handle($child);
            }
            // We clean the object from the cache
            $sess->remove($id);
        }
    }