public static function checkRouteMatchesMethod($ctr, string $met_call):int
    {
        if (isset($ctr["m_allow"]) && in_array("ALL", $ctr["m_allow"])) {
            return (1);
        } elseif (isset($ctr["m_allow"]) && is_string($ctr["m_allow"]) && $ctr["m_allow"] === $met_call) {
            return (1);
        } elseif (isset($ctr["m_allow"]) && is_array($ctr["m_allow"]) && in_array($met_call, $ctr["m_allow"])) {
            return (1);
        } else {
            throw new Server405(new \ArrayObject(array("explain" =>
                "Method request $met_call is not allowed for this route", "solution" =>
                "Route required methods : ".json_encode($ctr["m_allow"]))));
        }
    }
public static function checkRouteMatchesMethod($ctr, string $met_call):int
    {
        if (isset($ctr["m_allow"]) && in_array("ALL", $ctr["m_allow"])) {
            return (1);
        } elseif (isset($ctr["m_allow"]) && is_string($ctr["m_allow"]) && $ctr["m_allow"] === $met_call) {
            return (1);
        } elseif (isset($ctr["m_allow"]) && is_array($ctr["m_allow"]) && in_array($met_call, $ctr["m_allow"])) {
            return (1);
        } else {
            throw new Server405(new \ArrayObject(array("explain" =>
                "Method request $met_call is not allowed for this route", "solution" =>
                "Route required methods : ".json_encode($ctr["m_allow"]))));
        }
    }
public static function checkRouteMatchesMethod ( $ ctr , string $ met_call ) : int { if ( isset ( $ ctr [ "m_allow" ] ) && in_array ( "ALL" , $ ctr [ "m_allow" ] ) ) { return ( 1 ) ; } elseif ( isset ( $ ctr [ "m_allow" ] ) && is_string ( $ ctr [ "m_allow" ] ) && $ ctr [ "m_allow" ] === $ met_call ) { return ( 1 ) ; } elseif ( isset ( $ ctr [ "m_allow" ] ) && is_array ( $ ctr [ "m_allow" ] ) && in_array ( $ met_call , $ ctr [ "m_allow" ] ) ) { return ( 1 ) ; } else { throw new Server405 ( new \ ArrayObject ( array ( "explain" => "Method request $met_call is not allowed for this route" , "solution" => "Route required methods : " . json_encode ( $ ctr [ "m_allow" ] ) ) ) ) ; } }
Check match of Method request and method request route
@param  mixed $ctr Controller parameters
@param string $met_call Method request called
@return int Is a success
@throws Server405
Check match of Method request and method request route