private function checkIfKeyExist(array $resource, string $filename, string $appname):int
    {
        if (!isset($resource["activity"])) {
            throw new  Server500(new \ArrayObject(array("explain" => "Missing Tag 'activity' in ".
                strtoupper($filename)." routing file : ".$appname, "solution" => "Please add this tag")));
        }
        if (!isset($resource["name"])) {
            throw new  Server500(new \ArrayObject(array("explain" => "Missing Tag 'name' in ".
                strtoupper($filename)." routing file : ".$appname, "solution" => "Please add this tag")));
        }
        if (!isset($resource["path"])) {
            throw new  Server500(new \ArrayObject(array("explain" => "Missing Tag 'path' in ".
                strtoupper($filename)." routing file : ".$appname, "solution" => "Please add this tag")));
        }


        if ($resource["name"] == "") {
            throw new  Server500(new \ArrayObject(array("explain" => "Empty Tag 'name' in ".
                strtoupper($filename)." routing file : ".$appname, "solution" => "Check contain of this tag")));
        }
        if ($resource["activity"] == "") {
            throw new  Server500(new \ArrayObject(array("explain" => "Empty Tag 'activity' in ".
                strtoupper($filename)." routing file : ".$appname, "solution" => "Check contain of this tag")));
        }
        if ($resource["path"] == "") {
            throw new  Server500(new \ArrayObject(array("explain" => "Empty Tag 'path' in ".
                strtoupper($filename)." routing file : ".$appname, "solution" => "Check contain of this tag")));
        }

        if (isset($resource["visibility"]) && !in_array($resource["visibility"], $this->visibilities)) {
            throw new  Server500(new \ArrayObject(array("explain" =>
                "Tag 'visibility' is empty or parameter for 'visibility' is not recognized in ".
                strtoupper($filename)." routing file - ".$appname, "solution" =>
                "Check contain of this tag (Visibility must be private, public or disabled)")));
        }

        return (1);
    }