public static function requireParameters($parameters, $required)
    {
        //Work with arrays
        if (is_object($parameters)) {
            $parameters = (array)$parameters;
        }

        $missing = [];

        if (!is_array($required)) {
            $required = [$required];
        }

        foreach ($required as $key) {
            if (!isset($parameters[$key])) {
                array_push($missing, $key);
            }
        }

        if (count($missing)) {
            throw new MissingParametersException($missing);
        }
    }