forked from NEKOGET/FuelPHP_docs_jp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpackage.html
212 lines (197 loc) · 6.28 KB
/
package.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
<!doctype html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="./../assets/css/combined.css">
<link rel="shortcut icon" href="./../favicon.ico" />
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
var path = './../';
var class_prefix = "Package::";
</script>
<script src="./../assets/js/combined.js"></script>
<title>Package - クラス - FuelPHP ドキュメント</title>
</head>
<body>
<div id="container">
<header id="header">
<div class="table">
<h1>
<a href="http://fuelphp.com"><img height="37px" width="147px" src="./../assets/img/fuel.png" /></a>
<strong>Documentation</strong>
</h1>
<form id="google_search">
<p>
<span id="search_clear"> </span>
<input type="submit" name="search_submit" id="search_submit" value="検索" />
<input type="text" value="" id="search_input" name="search_input" />
</p>
</form>
</div>
<nav>
<div class="clear"></div>
</nav>
<a href="#" id="toc_handle">目次</a>
<div class="clear"></div>
</header>
<div id="cse">
<div id="cse_point"></div>
<div id="cse_content"></div>
</div>
<div id="main">
<h2>Package クラス</h2>
<p><kbd>Package</kbd> クラスは、パッケージをロードする/アンロードする、パッケージがロードされているか調べる、全てのパッケージをロードする、を容易にします。</p>
<article>
<h4 class="method" id="method_load">load($package, $path = null)</h4>
<p><strong>load</strong> メソッドは、実行時に1つまたは複数のパッケージをロードします。パッケージが見つからない場合は、<kbd>PackageNotFoundException</kbd> を投げます。</p>
<table class="method">
<tbody>
<tr>
<th class="legend">静的</th>
<td>はい</td>
</tr>
<tr>
<th>パラメータ</th>
<td>
<table class="parameters">
<tr>
<th>パラメータ</th>
<th>デフォルト</th>
<th class="description">説明</th>
</tr>
<tr>
<th><kbd>$package</kbd></th>
<td><i>必須</i></td>
<td>ロードするパッケージ名、またはパッケージとパッケージパスからなる配列。</td>
</tr>
<tr>
<th><kbd>$path</kbd></th>
<td><code>PKGPATH</code></td>
<td>パッケージがインストールされているフォルダのパス。</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>返り値</th>
<td><i>void</i></td>
</tr>
<tr>
<th>例</th>
<td>
<pre class="php"><code>// orm パッケージをロードする
Package::load('orm');
// 指定したディレクトリから parser パッケージをロードする
Package::load('parser', '/path/to/packages/dir/');
// 単一のパッケージインストールから複数のパッケージをロードする
Package::load( array('First' => PKGPATH.'my'.DS.'first'.DS, 'Last' => PKGPATH.'my'.DS.'last'.DS) );
// 存在しないパッケージをロードする
Package::load('awesome'); // PackageNotFoundException を投げる
</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 class="method" id="method_unload">unload($package)</h4>
<p><strong>unload</strong> メソッドは、実行時にパッケージをアンロードします。</p>
<table class="method">
<tbody>
<tr>
<th class="legend">静的</th>
<td>はい</td>
</tr>
<tr>
<th>パラメータ</th>
<td>
<table class="parameters">
<tr>
<th>パラメータ</th>
<th>デフォルト</th>
<th class="description">説明</th>
</tr>
<tr>
<th><kbd>$package</kbd></th>
<td><i>必須</i></td>
<td>アンロードするパッケージ名。</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>返り値</th>
<td><i>void</i></td>
</tr>
<tr>
<th>例</th>
<td>
<pre class="php"><code>// orm パッケージをアンロードする
Package::unload('orm');
</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
<article>
<h4 class="method" id="method_loaded">loaded($package = null)</h4>
<p><strong>loaded</strong> メソッドは、パッケージが現在ロードされているかどうかを調べます。パッケージ名を省略すると、現在ロードされているパッケージ全てを返します。</p>
<table class="method">
<tbody>
<tr>
<th class="legend">静的</th>
<td>はい</td>
</tr>
<tr>
<th>パラメータ</th>
<td>
<table class="parameters">
<tr>
<th>パラメータ</th>
<th>デフォルト</th>
<th class="description">説明</th>
</tr>
<tr>
<th><kbd>$package</kbd></th>
<td><kbd>null</kbd></td>
<td>ロードされているか調べるパッケージ名。</td>
</tr>
</table>
</td>
</tr>
<tr>
<th>返り値</th>
<td><kbd>bool|array</kbd></td>
</tr>
<tr>
<th>例</th>
<td>
<pre class="php"><code>// orm パッケージがロードされているか調べる
$loaded = Package::loaded('orm');
// ロードされている全パッケージを取得する
$loaded = Package::loaded();
/*
以下のようなデータを返します:
array(
'orm' => '/path/to/orm',
'parser' => '/path/to/parser',
)
*/
</code></pre>
</td>
</tr>
</tbody>
</table>
</article>
</div>
<footer>
<p>
© FuelPHP Development Team 2010-2016 - <a href="http://fuelphp.com">FuelPHP</a> is released under the MIT license.
[ <a href="https://github.com/fuel/docs/commits/1.8/develop/classes/package.html">原文コミット履歴</a> | <a href="https://github.com/NEKOGET/FuelPHP_docs_jp/commits/1.8/develop_japanese/classes/package.html">翻訳コミット履歴</a> | <a href="https://github.com/NEKOGET/FuelPHP_docs_jp/blob/1.8/develop_japanese/classes/package.html">GitHubで修正</a> ]
</p>
</footer>
</div>
</body>
</html>