Visithor\Generator\UrlGenerator::getUrlHTTPCodesFromConfig PHP Method

getUrlHTTPCodesFromConfig() protected method

Get url HTTP Codes given its configuration
protected getUrlHTTPCodesFromConfig ( mixed $urlConfig, array $defaultHTTPCodes ) : string[]
$urlConfig mixed Url configuration
$defaultHTTPCodes array Array of HTTP Codes
return string[] Set of HTTP Codes
    protected function getUrlHTTPCodesFromConfig($urlConfig, array $defaultHTTPCodes)
    {
        $HTTPCodes = is_array($urlConfig) && isset($urlConfig[1]) && !empty($urlConfig[1]) ? $urlConfig[1] : $defaultHTTPCodes;
        return is_array($HTTPCodes) ? $HTTPCodes : [$HTTPCodes];
    }