<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.ds-collection.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'ja',
  ),
  'this' => 
  array (
    0 => 'ds-collection.copy.php',
    1 => 'Ds\\Collection::copy',
    2 => 'Returns a shallow copy of the collection',
  ),
  'up' => 
  array (
    0 => 'class.ds-collection.php',
    1 => 'Ds\\Collection',
  ),
  'prev' => 
  array (
    0 => 'ds-collection.clear.php',
    1 => 'Ds\\Collection::clear',
  ),
  'next' => 
  array (
    0 => 'ds-collection.isempty.php',
    1 => 'Ds\\Collection::isEmpty',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/ds/ds/collection/copy.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="ds-collection.copy" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Ds\Collection::copy</h1>
  <p class="verinfo">(PECL ds &gt;= 1.0.0)</p><p class="refpurpose"><span class="refname">Ds\Collection::copy</span> &mdash; <span class="dc-title">Returns a shallow copy of the collection</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-ds-collection.copy-description">
  <h3 class="title">説明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Ds\Collection::copy</strong></span>(): <span class="type"><a href="class.ds-collection.php" class="type Ds\Collection">Ds\Collection</a></span></div>

  <p class="para rdfs-comment">
    Returns a shallow copy of the collection.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-ds-collection.copy-parameters">
  <h3 class="title">パラメータ</h3>
  <p class="para">この関数にはパラメータはありません。</p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-ds-collection.copy-returnvalues">
  <h3 class="title">戻り値</h3>
  <p class="para">
   Returns a shallow copy of the collection.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-ds-collection.copy-examples">
  <h3 class="title">例</h3>
  <div class="example" id="example-1">
   <p><strong>例1 <span class="function"><strong>Ds\Collection::copy()</strong></span> example</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br />$a </span><span style="color: #007700">= new </span><span style="color: #0000BB">\Ds\Vector</span><span style="color: #007700">([</span><span style="color: #0000BB">1</span><span style="color: #007700">, </span><span style="color: #0000BB">2</span><span style="color: #007700">, </span><span style="color: #0000BB">3</span><span style="color: #007700">]);<br /></span><span style="color: #0000BB">$b </span><span style="color: #007700">= </span><span style="color: #0000BB">$a</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">copy</span><span style="color: #007700">();<br /><br /></span><span style="color: #0000BB">$b</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">push</span><span style="color: #007700">(</span><span style="color: #0000BB">4</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$a</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">$b</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
   </div>

   <div class="example-contents"><p>上の例の出力は、
たとえば以下のようになります。</p></div>
   <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">Ds\Vector Object
(
    [0] =&gt; 1
    [1] =&gt; 2
    [2] =&gt; 3
)
Ds\Vector Object
(
    [0] =&gt; 1
    [1] =&gt; 2
    [2] =&gt; 3
    [3] =&gt; 4
)</pre>
</div>
   </div>
  </div>
 </div>



</div><?php manual_footer($setup); ?>