このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン 次のリビジョン 両方とも次のリビジョン | ||
psr:psr13 [2020/07/20 08:22] y2sunlight [3.1 Psr\Link\LinkInterface] |
psr:psr13 [2020/07/20 08:40] y2sunlight [3.4 Psr\Link\EvolvableLinkProviderInterface] |
||
---|---|---|---|
行 197: | 行 197: | ||
/** | /** | ||
- | | + | |
- | * 発展的なリンク値オブジェクト。 | + | |
*/ | */ | ||
interface EvolvableLinkInterface extends LinkInterface | interface EvolvableLinkInterface extends LinkInterface | ||
{ | { | ||
/** | /** | ||
- | * Returns an instance with the specified href. | ||
* 指定されたhrefを持つインスタンスを返します。 | * 指定されたhrefを持つインスタンスを返します。 | ||
* | * | ||
* @param string $href | * @param string $href | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | | ||
| | ||
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
* | * | ||
- | * An implementing library SHOULD evaluate a passed object to a string | ||
- | * immediately rather than waiting for it to be returned later. | ||
* 実装ライブラリは、渡されたオブジェクトが後で返されるのを待つのではなく、 | * 実装ライブラリは、渡されたオブジェクトが後で返されるのを待つのではなく、 | ||
* すぐに文字列に評価する必要があります( SHOULD )。 | * すぐに文字列に評価する必要があります( SHOULD )。 | ||
行 231: | 行 220: | ||
/** | /** | ||
- | * Returns an instance with the specified relationship included. | ||
* 指定された関係を含むインスタンスを返します。 | * 指定された関係を含むインスタンスを返します。 | ||
* | * | ||
- | * If the specified rel is already present, this method MUST return | + | * 指定されたrelがすでに存在する場合、このメソッドはエラーなしで正常に戻る必要があります。 |
- | * normally without errors, but without adding the rel a second time. | + | |
- | * 指定されたrelがすでに存在する場合、このメソッドはエラーなしで正常に戻る必要がありますが、 | + | |
- | * もう一度relを追加する必要はありません。 | + | |
* | * | ||
* @param string $rel | * @param string $rel | ||
- | | ||
| | ||
* @return static | * @return static | ||
行 247: | 行 232: | ||
/** | /** | ||
- | * Returns an instance with the specified relationship excluded. | ||
* 指定された関係を除外したインスタンスを返します。 | * 指定された関係を除外したインスタンスを返します。 | ||
* | * | ||
- | * If the specified rel is already not present, this method MUST return | ||
- | * normally without errors. | ||
* 指定されたrelが既に存在しない場合、このメソッドはエラーなしで正常に戻る必要があります( MUST )。 | * 指定されたrelが既に存在しない場合、このメソッドはエラーなしで正常に戻る必要があります( MUST )。 | ||
* | * | ||
* @param string $rel | * @param string $rel | ||
- | | ||
| | ||
* @return static | * @return static | ||
行 262: | 行 243: | ||
/** | /** | ||
- | * Returns an instance with the specified attribute added. | ||
* 指定された属性が追加されたインスタンスを返します。 | * 指定された属性が追加されたインスタンスを返します。 | ||
* | * | ||
- | * If the specified attribute is already present, it will be overwritten | ||
- | * with the new value. | ||
* 指定された属性がすでに存在する場合は、新しい値で上書きされます。 | * 指定された属性がすでに存在する場合は、新しい値で上書きされます。 | ||
* | * | ||
* @param string $attribute | * @param string $attribute | ||
- | | ||
| | ||
* @param string $value | * @param string $value | ||
- | | ||
| | ||
* @return static | * @return static | ||
行 280: | 行 256: | ||
/** | /** | ||
- | * Returns an instance with the specified attribute excluded. | ||
* 指定された属性を除外したインスタンスを返します。 | * 指定された属性を除外したインスタンスを返します。 | ||
* | * | ||
- | * If the specified attribute is not present, this method MUST return | ||
- | * normally without errors. | ||
* 指定された属性が存在しない場合、このメソッドはエラーなしで正常に戻る必要があります( MUST )。 | * 指定された属性が存在しない場合、このメソッドはエラーなしで正常に戻る必要があります( MUST )。 | ||
* | * | ||
* @param string $attribute | * @param string $attribute | ||
- | | ||
| | ||
* @return static | * @return static | ||
行 306: | 行 278: | ||
/** | /** | ||
- | * A link provider object. | ||
* リンクプロバイダーオブジェクト | * リンクプロバイダーオブジェクト | ||
*/ | */ | ||
行 312: | 行 283: | ||
{ | { | ||
/** | /** | ||
- | * Returns an iterable of LinkInterface objects. | ||
* LinkInterfaceオブジェクトのiterableを返します。 | * LinkInterfaceオブジェクトのiterableを返します。 | ||
* | * | ||
- | * The iterable may be an array or any PHP \Traversable object. If no links | + | * iterableは、配列または任意のPHP \Traversableオブジェクトです。利用可能なリンクがない場合は、 |
- | * are available, an empty array or \Traversable MUST be returned. | + | * 空の配列 または \Traversableを返す必要があります( MUST )。 |
- | * iterableは、配列または任意のPHP \Traversableオブジェクトです。 利用可能なリンクがない場合は、 | + | |
- | * 空の配列または\ Traversableを返す必要があります( MUST )。 | + | |
* | * | ||
* @return LinkInterface[]|\Traversable | * @return LinkInterface[]|\Traversable | ||
行 325: | 行 293: | ||
/** | /** | ||
- | * Returns an iterable of LinkInterface objects that have a specific relationship. | ||
* 特定の関係を持つLinkInterfaceオブジェクトのiterableを返します。 | * 特定の関係を持つLinkInterfaceオブジェクトのiterableを返します。 | ||
* | * | ||
- | * The iterable may be an array or any PHP \Traversable object. If no links | + | * iterableは、配列または任意の PHP \Traversableオブジェクトです。その関係を持つリンクがない場合は、 |
- | * with that relationship are available, an empty array or \Traversable MUST be returned. | + | |
- | * iterableは、配列または任意のPHP \Traversableオブジェクトです。 その関係を持つリンクがない | + | |
- | | + | |
* | * | ||
* @return LinkInterface[]|\Traversable | * @return LinkInterface[]|\Traversable | ||
行 349: | 行 314: | ||
/** | /** | ||
- | | + | |
- | * 発展的リンクプロバイダー値オブジェクト | + | |
*/ | */ | ||
interface EvolvableLinkProviderInterface extends LinkProviderInterface | interface EvolvableLinkProviderInterface extends LinkProviderInterface | ||
{ | { | ||
/** | /** | ||
- | * Returns an instance with the specified link included. | ||
* 指定されたリンクを含むインスタンスを返します。 | * 指定されたリンクを含むインスタンスを返します。 | ||
* | * | ||
- | * If the specified link is already present, this method MUST return normally | ||
- | * without errors. The link is present if $link is === identical to a link | ||
- | * object already in the collection. | ||
* 指定されたリンクがすでに存在する場合、このメソッドはエラーなしで正常に戻る必要があります。 | * 指定されたリンクがすでに存在する場合、このメソッドはエラーなしで正常に戻る必要があります。 | ||
- | * $linkが===既にコレクションにあるリンクオブジェクトと同一である場合、リンクは存在します。 | + | * $linkが既にコレクションにあるリンクオブジェクトと同一( '' |
* | * | ||
* @param LinkInterface $link | * @param LinkInterface $link | ||
- | | ||
| | ||
* @return static | * @return static | ||
行 372: | 行 331: | ||
/** | /** | ||
- | * Returns an instance with the specified link removed. | ||
* 指定されたリンクが削除されたインスタンスを返します。 | * 指定されたリンクが削除されたインスタンスを返します。 | ||
* | * | ||
- | * If the specified link is not present, this method MUST return normally | ||
- | * without errors. The link is present if $link is === identical to a link | ||
- | * object already in the collection. | ||
* 指定されたリンクが存在しない場合、このメソッドはエラーなしで正常に戻る必要があります。 | * 指定されたリンクが存在しない場合、このメソッドはエラーなしで正常に戻る必要があります。 | ||
- | * $linkが===既にコレクションにあるリンクオブジェクトと同一である場合、リンクは存在します。 | + | * $linkが既にコレクションにあるリンクオブジェクトと同一( '' |
* | * | ||
* @param LinkInterface $link | * @param LinkInterface $link | ||
- | | ||
| | ||
* @return static | * @return static |