private static function serialiseOrigin($origin)
    {
        if (!is_array($origin)) {
            $result = 'null';
        } else {
            $result = $origin[0] . '://' . lib\HostProcessing::serializeHost($origin[1]);
            if (isset(lib\URL::$specialSchemes[$origin[0]]) && $origin[2] !== lib\URL::$specialSchemes[$origin[0]]) {
                $result .= ':' . $origin[2];
            }
        }
        return $result;
    }
private static function serialiseOrigin($origin)
    {
        if (!is_array($origin)) {
            $result = 'null';
        } else {
            $result = $origin[0] . '://' . lib\HostProcessing::serializeHost($origin[1]);
            if (isset(lib\URL::$specialSchemes[$origin[0]]) && $origin[2] !== lib\URL::$specialSchemes[$origin[0]]) {
                $result .= ':' . $origin[2];
            }
        }
        return $result;
    }
private static function serialiseOrigin ( $ origin ) { if ( ! is_array ( $ origin ) ) { $ result = 'null' ; } else { $ result = $ origin [ 0 ] . '://' . lib \ HostProcessing :: serializeHost ( $ origin [ 1 ] ) ; if ( isset ( lib \ URL :: $ specialSchemes [ $ origin [ 0 ] ] ) && $ origin [ 2 ] !== lib \ URL :: $ specialSchemes [ $ origin [ 0 ] ] ) { $ result .= ':' . $ origin [ 2 ] ; } } return $ result ; }
The serialization of an origin.
@link https://html.spec.whatwg.org/multipage/browsers.html#ascii-serialisation-of-an-origin HTML Standard
@param string[]|string $origin
@return string
The serialization of an origin .