URI-1.35 > URI::WithBase

名前

URI::WithBase - URIs which remember their base

URI::WithBase - ベースを覚えている URI

概要

 $u1 = URI::WithBase->new($str, $base);
 $u2 = $u1->abs;

 $base = $u1->base;
 $u1->base( $new_base )

説明

This module provides the URI::WithBase class. Objects of this class are like URI objects, but can keep their base too. The base represents the context where this URI was found and can be used to absolutize or relativize the URI. All the methods described in URI are supported for URI::WithBase objects.

このモジュールは URI::WithBase クラスを提供します。 このクラスのオブジェクトは URI オブジェクトに似ていますが、その ベースも保持します。 The base represents the context where this URI was found and can be used to absolutize or relativize the URI. All the methods described in URI are supported for URI::WithBase objects. (TBT)

The methods provided in addition to or modified from those of URI are:

URI より追加あるいは修正されたメソッドは以下の通りです:

$uri = URI::WithBase->new($str, [$base])

The constructor takes an optional base URI as the second argument. If provided, this argument initializes the base attribute.

コンストラクタはオプションのベース URI を 2 番目の引数として取ります。 引数が与えられると、これでベース属性を初期化します。

$uri->base( [$new_base] )

Can be used to get or set the value of the base attribute. The return value, which is the old value, is a URI object or undef.

base 属性の値を取得あるいは設定するために使われます。 The return value, which is the old value, is a URI object or undef. (TBT)

$uri->abs( [$base_uri] )

The $base_uri argument is now made optional as the object carries its base with it. A new object is returned even if $uri is already absolute (while plain URI objects simply return themselves in that case).

オブジェクトがベースを保持しているので、$base_uri 引数はオプションになります。 A new object is returned even if $uri is already absolute (while plain URI objects simply return themselves in that case). (TBT)

$uri->rel( [$base_uri] )

The $base_uri argument is now made optional as the object carries its base with it. A new object is always returned.

オブジェクトがベースを保持しているので、$base_uri 引数はオプションになります。 新しいオブジェクトが常に返されます。

SEE ALSO

URI

コピーライト

Copyright 1998-2002 Gisle Aas.