public function filterScheme($scheme)
    {
        $valids = [
            ''      => true,
            'http'  => true,
            'https' => true,
        ];
        $scheme = str_replace('://', '', strtolower((string) $scheme));
        if (!isset($valids[$scheme])) {
            throw new \InvalidArgumentException('Uri scheme must be one of: "", "https", "http"');
        }

        return $scheme;
    }
public function filterScheme($scheme)
    {
        $valids = [
            ''      => true,
            'http'  => true,
            'https' => true,
        ];
        $scheme = str_replace('://', '', strtolower((string) $scheme));
        if (!isset($valids[$scheme])) {
            throw new \InvalidArgumentException('Uri scheme must be one of: "", "https", "http"');
        }

        return $scheme;
    }
public function filterScheme ( $ scheme ) { $ valids = [ '' => true , 'http' => true , 'https' => true , ] ; $ scheme = str_replace ( '://' , '' , strtolower ( ( string ) $ scheme ) ) ; if ( ! isset ( $ valids [ $ scheme ] ) ) { throw new \ InvalidArgumentException ( 'Uri scheme must be one of: "", "https", "http"' ) ; } return $ scheme ; }
Filter the url scheme component.

@param (string) $scheme valid scheme

@since 3.0.0

@return string
Filter the url scheme component .