Template:MW file
| MediaWiki ファイル: {{{1}}} | |
|---|---|
| 場所: | / |
| ソース コード: | master • 1.45.3 • 1.44.5 • 1.43.8 |
| クラス: | コードを検索 • 説明文書を検索 |
| このテンプレートは、約 6,500+ ページで使用されています。 大規模な崩壊や不要なサーバー負荷を回避するため、このテンプレートのいかなる変更も、前もって下位ページ /サンドボックス、/テストケース、ご自身の利用者下位ページ、のいずれかでテストすべきです。 テスト済みの変更であれば、このページに一度の編集で追加できます。 いかなる変更も、実装する前にトーク ページで議論することをご検討ください。 |
MediaWiki コアのファイルに関する基礎情報ボックスを表示します。master、安定版、レガシーの各ブランチのソース コードへのリンクと、生成された PHP 説明文書のクラスとインターフェイスへのリンクが含まれます。
{{MW file|FILENAME|PATH
|class1=CLASS
|class2=CLASS
|class3=CLASS
|...
|interface1=INTERFACE
|interface2=INTERFACE
|interface3=INTERFACE
|NotInGit=REASON
}}
- FILENAME は、拡張子も含むファイル名です。
- ファイルが最近改名された場合、リンクが動作するよう旧名を指定するために
stable=とlegacy=パラメーターを使用できます。ただし、そのファイル名の変更を含むリリースが master→stable→legacy と移行するにつれて、テンプレート呼び出しを更新する必要があります。
- ファイルが最近改名された場合、リンクが動作するよう旧名を指定するために
- PATH はファイルへのパスです。先頭に / を付けず、末尾には / を付けてください。 ルート ディレクトリにあるファイルの場合は空欄のままにしてください。
class引数はすべて省略可能です。指定すると、生成済みの説明文書にリンクされます。 CLASS は、URL 内で使用されるため、クラス名にすべきです。 例:「Parser」を指定すると「classParser.html」へのリンクが生成されます。 このテンプレートではクラスのパラメーターをclass1-class6の 6 個まで指定できます。- INTERFACE も同様です。 このテンプレートではインターフェイスのパラメーターを 3 個まで指定できます。
NotInGit引数は省略可能です。何らかの理由でファイルが Git 内にない場合のみ使用してください (作者は、これにはLocalSettings.phpのみが該当すると考えます)。 REASON は、基礎情報ボックス内に表示される理由です。NotInGitは大文字・小文字が区別されることにご注意ください!
このテンプレートは、マニュアルで広範囲にわたって使用されています。
例
{{MW file|index.php|}}
| MediaWiki ファイル: index.php | |
|---|---|
| 場所: | |
| ソース コード: | master • 1.45.3 • 1.44.5 • 1.43.8 |
| クラス: | コードを検索 • 説明文書を検索 |
{{MW file|Article.php|includes/page/
|class1=MediaWiki\Page\Article
}}
| MediaWiki ファイル: Article.php | |
|---|---|
| 場所: | includes/page/ (1.46 以降は includes/Page/) |
| ソース コード: | master • 1.45.3 • 1.44.5 • 1.43.8 |
| クラス: | MediaWiki\Page\Article |
{{MW file|WikiPage.php|includes/page/
|class1=MediaWiki\Page\WikiPage
|interface1=MediaWiki\Page\Page
}}
| MediaWiki ファイル: WikiPage.php | |
|---|---|
| 場所: | includes/page/ (1.46 以降は includes/Page/) |
| ソース コード: | master • 1.45.3 • 1.44.5 • 1.43.8 |
| クラス: | MediaWiki\Page\WikiPage • MediaWiki\Page\Page |
{{MW file|LocalSettings.php|
|NotInGit=インストール時に作成される
}}
| MediaWiki ファイル: LocalSettings.php | |
|---|---|
| 場所: | |
| ソース コード: | Git にありません (インストール時に作成される) |
| クラス: | |
{{MW file|includes/Title/Title.php
|stable=includes/title/Title.php
|legacy=includes/title/Title.php
|lts=includes/Title.php
|class1=MediaWiki\Title\Title
}}
| MediaWiki ファイル: includes/Title/Title.php | |
|---|---|
| ソース コード: | master • 1.45.3 • 1.44.5 • 1.43.8 |
| クラス: | MediaWiki\Title\Title |
関連項目
- {{Git file}} – a simple link to a file on gerrit (from mediawiki/core or otherwise)
- Category:MediaWiki code pages without class names – incompletely filled pages are automatically listed by this template
- Category:MediaWiki code pages without namespaces – File pages without a namespace declared are automatically added here. They should probably have a namespace.
Displays an informative box about a file in MediaWiki core, with links to its source code in master, stable, and legacy branches, and links to its classes and interfaces in the generated PHP documentation.
| Parameter | Description | Type | Status | |
|---|---|---|---|---|
| File name | 1 | Name of the file, including extension. If the file has been recently renamed, you can use the stable= and the legacy= parameters to provide the old name so links work; you'll need to update the template invocation as the release in which the file was renamed moves from master → stable → legacy.
| String | required |
| File path | 2 | Path to the file; do not include a leading slash, include the trailing slash. Leave it blank for files in the root directory.
| String | required |
| Not in Git? | NotInGit | Whether the version is in Git version control (only rarely used for files like LocalSettings.php and DevelopmentSettings.php). Optional and should only be used if the file is not in Git for some reason. Reason= is the reason that is displayed in the infobox. Note that NotInGit is CASE-SENSITIVE.
| String | optional |
| Stable MediaWiki version | stable | no description | Unknown | optional |
| Legacy MediaWiki version | legacy | no description | Unknown | optional |
| LTS MediaWiki Version | lts | Long-Term Support version for MediaWiki | Unknown | optional |
| Class 1 | class1 | Class arguments are all optional, and if supplied will link to the generated documentation. Class should be the class name, as used in the URL. The template allows up to six class parameters
| String | suggested |
| Class 2 | class2 | no description | Unknown | optional |
| Class 3 | class3 | no description | Unknown | optional |
| Class 4 | class4 | no description | Unknown | optional |
| Class 5 | class5 | no description | Unknown | optional |
| Class 6 | class6 | no description | Unknown | optional |
| Interface 1 | interface1 | Similar to Class. The template allows up to three interface parameters. | Unknown | suggested |
| Interface 2 | interface2 | no description | Unknown | optional |
| Interface 3 | interface3 | no description | Unknown | optional |
| Example | example | no description | Unknown | optional |
| nodisplaytitle | nodisplaytitle | no description | Unknown | optional |