Skip to content

Commit b31ed41

Browse files
committed
本家変更分をmerge
2 parents 458ae80 + 6a2b1d8 commit b31ed41

29 files changed

+839
-104
lines changed

assets/js/combined.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

classes/arr.html

Lines changed: 225 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,6 +1363,71 @@ <h4 id="method_insert" class="method">insert(Array &amp;$original, $value, $pos)
13631363
[5] => Jill
13641364
)
13651365

1366+
</code></pre>
1367+
</td>
1368+
</tr>
1369+
</tbody>
1370+
</table>
1371+
</article>
1372+
1373+
<article>
1374+
<h4 id="method_insert_assoc" class="method">insert_assoc(array &amp;$original, array $values, $pos)</h4>
1375+
<p>The <strong>insert_assoc</strong> method inserts elements into an associative array, at the specified position.<br />
1376+
<u>WARNING</u>: The original array is edited by reference, only boolean success is returned.</p>
1377+
<table class="method">
1378+
<tbody>
1379+
<tr>
1380+
<th class="legend">Static</th>
1381+
<td>Yes</td>
1382+
</tr>
1383+
<tr>
1384+
<th>Parameters</th>
1385+
<td>
1386+
<table class="parameters">
1387+
<tr>
1388+
<th>Param</th>
1389+
<th>Default</th>
1390+
<th class="description">Description</th>
1391+
</tr>
1392+
<tr>
1393+
<th><kbd>$original</kbd></th>
1394+
<td><em>required</em></td>
1395+
<td>The array to use</td>
1396+
</tr>
1397+
<tr>
1398+
<th><kbd>$values</kbd></th>
1399+
<td><em>required</em></td>
1400+
<td>Array with value(s) to insert</td>
1401+
</tr>
1402+
<tr>
1403+
<th><kbd>$pos</kbd></th>
1404+
<td><em>required</em></td>
1405+
<td>
1406+
The location in the original array where the new values should be inserted.
1407+
If a negative value is given, the position is counted from the back of the array.</td>
1408+
</tr>
1409+
</table>
1410+
</td>
1411+
</tr>
1412+
<tr>
1413+
<th>Returns</th>
1414+
<td>boolean, true on success, false if $pos is out of bounds.</td>
1415+
</tr>
1416+
<tr>
1417+
<th>Example</th>
1418+
<td>
1419+
<pre class="php"><code>$character = array("name" =&gt; "Jack", "surname" =&gt; "Reacher");
1420+
1421+
Arr::insert_assoc($people, array("initial" =&gt; "P.");
1422+
print_r($people);
1423+
1424+
// Result:
1425+
Array
1426+
(
1427+
[name] =&gt; Jack
1428+
[initial] =&gt; P.
1429+
[surname] =&gt; Reacher
1430+
)
13661431
</code></pre>
13671432
</td>
13681433
</tr>
@@ -1372,8 +1437,8 @@ <h4 id="method_insert" class="method">insert(Array &amp;$original, $value, $pos)
13721437

13731438
<article>
13741439
<h4 id="method_insert_before_key" class="method">insert_before_key(Array &amp;$original, $value, $key)</h4>
1375-
<p><strong>insert_before_key</strong> メソッドは与えられたキーの手前に要素を1つ追加します。<br />
1376-
<u>警告</u>: 元の配列は参照渡しされるので直接書き換えられます。成功かどうかを表すブール値のみが返ります。</p>
1440+
<p>The <strong>insert_before_key</strong> メソッドは与えられたキーの手前に要素を1つ追加します。<br />
1441+
<u>WARNING</u>: 元の配列は参照渡しされるので直接書き換えられます。成功かどうかを表すブール値のみが返ります。</p>
13771442
<table class="method">
13781443
<tbody>
13791444
<tr>
@@ -1703,7 +1768,11 @@ <h4 id="method_multisort" class="method">multisort($array, $conditions, $ignore_
17031768
<tr>
17041769
<th><kbd>$ornire_case</kbd></th>
17051770
<td><pre class="php"><code>false</code></pre></td>
1771+
<<<<<<< HEAD
17061772
<td>大文字/小文字を区別するかどうか。</td>
1773+
=======
1774+
<td>Whether to sort case insensitive.</td>
1775+
>>>>>>> 6a2b1d88d2f93780888954a75b63994f64bc7bda
17071776
</tr>
17081777
</table>
17091778
</td>
@@ -1796,7 +1865,7 @@ <h4 id="method_multisort" class="method">multisort($array, $conditions, $ignore_
17961865

17971866
<article>
17981867
<h4 id="method_in_array_recursive" class="method">in_array_recursive($needle, $haystack, $strict = false)</h4>
1799-
<p><strong>in_array_recursive</strong> メソッドは値が配列に含まれているかどうか再帰的にチェックします。</p>
1868+
<p>The <strong>in_array_recursive</strong> メソッドは値が配列に含まれているかどうか再帰的にチェックします。</p>
18001869
<table class="method">
18011870
<tbody>
18021871
<tr>
@@ -1934,6 +2003,90 @@ <h4 id="method_merge" class="method">merge($array)</h4>
19342003
[7] => 90
19352004
[8] => php
19362005
)
2006+
</code></pre>
2007+
</td>
2008+
</tr>
2009+
</tbody>
2010+
</table>
2011+
</article>
2012+
<article>
2013+
<h4 id="method_merge_assoc" class="method">merge_assoc($array)</h4>
2014+
<p>The <strong>merge_assoc</strong> method merges 2 or more arrays recursively, differs in 2 important ways from array_merge_recursive(): <br />
2015+
- When there's 2 different values and not both arrays, the latter value overwrites the earlier
2016+
instead of merging both into an array<br />
2017+
- Numeric keys aren't changed</p>
2018+
<table class="method">
2019+
<tbody>
2020+
<tr>
2021+
<th class="legend">Static</th>
2022+
<td>Yes</td>
2023+
</tr>
2024+
<tr>
2025+
<th>Parameters</th>
2026+
<td>
2027+
<table class="parameters">
2028+
<tr>
2029+
<th>Param</th>
2030+
<th>Type</th>
2031+
<th>Default</th>
2032+
<th class="description">Description</th>
2033+
</tr>
2034+
<tr>
2035+
<th><kbd>$array</kbd></th>
2036+
<td><em>array</em></td>
2037+
<td><em>required</em></td>
2038+
<td>Multiple variables all of which must be arrays</td>
2039+
</tr>
2040+
</table>
2041+
</td>
2042+
</tr>
2043+
<tr>
2044+
<th>Returns</th>
2045+
<td>array</td>
2046+
</tr>
2047+
<tr>
2048+
<th>Throws</th>
2049+
<td><kbd>InvalidArgumentException</kbd> when one of the passed arguments is no array.</td>
2050+
</tr>
2051+
<tr>
2052+
<th>Example</th>
2053+
<td>
2054+
<pre class="php"><code>$arr1 = array(
2055+
'one' => 1,
2056+
2 => 2,
2057+
3 => 3,
2058+
4 => array(
2059+
56
2060+
),
2061+
5=> 87
2062+
);
2063+
2064+
$arr2 = array(
2065+
1 => 27,
2066+
2 => 90,
2067+
4 => array(
2068+
'give_me' => 'bandwidth'
2069+
),
2070+
6 => '90',
2071+
7 => 'php',
2072+
);
2073+
2074+
print_r( Arr::merge_assoc($arr1, $arr2) );
2075+
// Result:
2076+
Array
2077+
(
2078+
[one] => 1
2079+
[2] => 90
2080+
[3] => 3
2081+
[4] => Array (
2082+
[0] => 56
2083+
[give_me] => bandwidth
2084+
)
2085+
[5] => 87
2086+
[1] => 27
2087+
[6] => 90
2088+
[7] => php
2089+
)
19372090
</code></pre>
19382091
</td>
19392092
</tr>
@@ -2181,6 +2334,75 @@ <h4 id="method_sum" class="method">sum($array, $key)</h4>
21812334
</table>
21822335
</article>
21832336

2337+
<article>
2338+
<h4 id="method_reindex" class="method">reindex($array)</h4>
2339+
<p>The <strong>reindex</strong> method recusively re-indexes the numeric keys of an array. It will not alter string keys.</p>
2340+
<table class="method">
2341+
<tbody>
2342+
<tr>
2343+
<th class="legend">Static</th>
2344+
<td>Yes</td>
2345+
</tr>
2346+
<tr>
2347+
<th>Parameters</th>
2348+
<td>
2349+
<table class="parameters">
2350+
<tr>
2351+
<th>Param</th>
2352+
<th>Type</th>
2353+
<th>Default</th>
2354+
<th class="description">Description</th>
2355+
</tr>
2356+
<tr>
2357+
<th><kbd>$array</kbd></th>
2358+
<td><em>array</em></td>
2359+
<td><em>required</em></td>
2360+
<td>the array to re-index</td>
2361+
</tr>
2362+
</table>
2363+
</td>
2364+
</tr>
2365+
<tr>
2366+
<th>Returns</th>
2367+
<td>array</td>
2368+
</tr>
2369+
<tr>
2370+
<th>Example</th>
2371+
<td>
2372+
<pre class="php"><code>$array = array(
2373+
2 => 2,
2374+
'three' => 3,
2375+
5 => array(
2376+
2 => 2,
2377+
'three' => 3,
2378+
5 => 5
2379+
),
2380+
7 => 7
2381+
);
2382+
2383+
// reindex the array
2384+
print_r( Arr::reindex($array) );
2385+
// Result:
2386+
Array
2387+
(
2388+
[0] => 2
2389+
[three] => 3
2390+
[1] => Array
2391+
(
2392+
[0] => 2
2393+
[three] => 3
2394+
[1] => 5
2395+
)
2396+
2397+
[2] => 7
2398+
)
2399+
</code></pre>
2400+
</td>
2401+
</tr>
2402+
</tbody>
2403+
</table>
2404+
</article>
2405+
21842406
<article>
21852407
<h4 id="method_previous_by_key" class="method">previous_by_key($array, $key, $get_value = false, $strict = false)</h4>
21862408
<p><strong>previous_by_key</strong> メソッドを用いると、

classes/autoloader.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ <h4 class="method" id="method_add_namespaces">add_namespaces($namespace, $prepen
144144
<pre class="php"><code>Autoloader::add_namespaces(array(
145145
'Mynamespace' => PKGPATH.'mynamespace/',
146146
'Othernamespace' => PKGPATH.'othernamespace/',
147-
);
147+
));
148148
</code></pre>
149149
</td>
150150
</tr>
@@ -276,9 +276,9 @@ <h4 class="method" id="method_add_classes">add_classes($classes)</h4>
276276
<th></th>
277277
<td>
278278
<pre class="php"><code>Autoloader::add_classes(array(
279-
'Namespace\\Class', PKGPATH.'namespace/classes/class.php',
280-
'Namespace\\Other', PKGPATH.'namespace/classes/other.php',
281-
);
279+
'Namespace\\Class' => PKGPATH.'namespace/classes/class.php',
280+
'Namespace\\Other' => PKGPATH.'namespace/classes/other.php',
281+
));
282282
</code></pre>
283283
</td>
284284
</tr>

classes/cli.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,11 @@ <h4 class="method" id="method_error">error($text)</h4>
194194

195195
<article>
196196
<h4 class="method" id="method_prompt">prompt($question = null, $options = array())</h4>
197+
<<<<<<< HEAD
197198
<p><strong>prompt</strong> メソッドは、ユーザの入力を受け付けるプロンプトを表示します。</p>
199+
=======
200+
<p>The <strong>prompt</strong> method prompts the user for input.</p>
201+
>>>>>>> 6a2b1d88d2f93780888954a75b63994f64bc7bda
198202
<table class="method">
199203
<tbody>
200204
<tr>

classes/event.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ <h4 class="method" id="method_instance">instance($name = 'fuelphp', array $event
482482
$same = Event::instance('my_instance');
483483

484484
$events->register('my_event', function(){
485-
'すごい!';
485+
echo 'すごい!';
486486
});
487487

488488
$same->register('my_event', function(){

classes/fieldset.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -717,7 +717,7 @@ <h4 class="method" id="method_populate">populate($input, $repopulate = false)</h
717717
<article>
718718
<h4 class="method" id="method_repopulate">repopulate()</h4>
719719
<p>Set all field values to the input send by a form submission (uses the form <kbd>method</kbd> attribute
720-
to decide wether to check POST or GET).</p>
720+
to decide whether to check POST or GET).</p>
721721
<table class="method">
722722
<tbody>
723723
<tr>
@@ -1185,11 +1185,11 @@ <h2 id="one_to_many_forms">Creating One-to-Many forms with ORM Models</h2>
11851185
* add the tabular form to it to create the one-to-many table.
11861186
*
11871187
* the data is provided by the relation 'comments' of the $article object, which
1188-
* are objects of the class 'Model_Comments'.
1188+
* are objects of the class 'Model_Comment'.
11891189
*
11901190
* you can disable the fieldset tag to avoid embedded fieldsets in your form
11911191
*/
1192-
$form->add(\Fieldset::forge('tabular')->set_tabular_form('Model_Comments', 'comments', $article)->set_fieldset_tag(false));
1192+
$form->add(\Fieldset::forge('tabular')->set_tabular_form('Model_Comment', 'comments', $article)->set_fieldset_tag(false));
11931193
</code></pre>
11941194

11951195
<p class="note">This only works for related models that <strong>DO NOT</strong> have a compound key!</p>
@@ -1239,7 +1239,7 @@ <h2 id="one_to_many_forms">Creating One-to-Many forms with ORM Models</h2>
12391239
else
12401240
{
12411241
// create a new related record
1242-
$article->comments[] = Model_Comments::forge(array('article_id' => $article->id, 'fieldA' => $data['fieldA'], 'fieldB' => $data['fieldB']));
1242+
$article->comments[] = Model_Comment::forge(array('article_id' => $article->id, 'fieldA' => $data['fieldA'], 'fieldB' => $data['fieldB']));
12431243
}
12441244
}
12451245

classes/file/handlers.html

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ <h4 class="method" id="method_file_get_time">get_time($type = 'modified')</h4>
491491

492492
<article>
493493
<h4 class="method" id="method_file_get_size">get_size()</h4>
494-
<p><strong>get_time</strong> メソッドは <a href="usage.html#method_get_size">File::get_size</a> のショートカットです。</p>
494+
<p><strong>get_size</strong> メソッドは <a href="usage.html#method_get_size">File::get_size</a> のショートカットです。</p>
495495
<table class="method">
496496
<tbody>
497497
<tr>
@@ -512,6 +512,30 @@ <h4 class="method" id="method_file_get_size">get_size()</h4>
512512
</table>
513513
</article>
514514

515+
<article>
516+
<h4 class="method" id="method_file_get_path">get_path()</h4>
517+
<p>The <strong>get_path</strong> method returns the file path.</p>
518+
<table class="method">
519+
<tbody>
520+
<tr>
521+
<th>Static</th>
522+
<td>No</td>
523+
</tr>
524+
<tr>
525+
<th>Returns</th>
526+
<td>The file path</td>
527+
</tr>
528+
<tr>
529+
<th>Example</th>
530+
<td>
531+
<pre class="php"><code>$file_path = $handler->get_path();
532+
// returns "/path/to/file.txt"</code></pre>
533+
</td>
534+
</tr>
535+
</tbody>
536+
</table>
537+
</article>
538+
515539
</section>
516540

517541
<section>

0 commit comments

Comments
 (0)