<!-- 
RSS generated by JIRA (5.2.7#850-sha1:b2af0c8dc8537b36121c6a579fabbdf79fc919e5) at Sat May 18 15:15:03 UTC 2013

It is possible to restrict the fields that are returned in this document by specifying the 'field' parameter in your request.
For example, to request only the issue key and summary add field=key&field=summary to the URL of your request.
For example:
http://www.doctrine-project.org/jira/si/jira.issueviews:issue-xml/DCOM-17/DCOM-17.xml?field=key&field=summary
-->
<rss version="0.92" >
<channel>
    <title>Doctrine Project</title>
    <link>http://www.doctrine-project.org/jira</link>
    <description>This file is an XML representation of an issue</description>
    <language>en-us</language>    <build-info>
        <version>5.2.7</version>
        <build-number>850</build-number>
        <build-date>21-02-2013</build-date>
    </build-info>

<item>
            <title>[DCOM-17] Add Collection::slice($offset, $length)</title>
                <link>http://www.doctrine-project.org/jira/browse/DCOM-17</link>
                <project id="10043" key="DCOM">Doctrine Common</project>
                        <description>&lt;p&gt;Since we are still at a point were bc breaks are potentially not so harming:&lt;/p&gt;

&lt;p&gt;We need a slice() method on the Collection for forward compatibility, the support for large and very large collections using FETCH_EXTRA would heavily benefit from a method like this.&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;/**
 * Extract a slice of $length elements starting at position $offset from the Collection.
 * 
 * If $length is &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt; it returns all elements from $offset to the end of the Collection.
 * Keys have to be preserved by &lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt; method.
 * 
 * @param &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; $offset
 * @param &lt;span class=&quot;code-object&quot;&gt;int&lt;/span&gt; $length
 * @&lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array
 */
&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function slice($offset, $length = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;);
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;

&lt;p&gt;The ArrayCollection implement would be:&lt;/p&gt;

&lt;div class=&quot;code panel&quot; style=&quot;border-width: 1px;&quot;&gt;&lt;div class=&quot;codeContent panelContent&quot;&gt;
&lt;pre class=&quot;code-java&quot;&gt;&lt;span class=&quot;code-keyword&quot;&gt;public&lt;/span&gt; function slice($offset, $length = &lt;span class=&quot;code-keyword&quot;&gt;null&lt;/span&gt;);
{
    &lt;span class=&quot;code-keyword&quot;&gt;return&lt;/span&gt; array_slice($&lt;span class=&quot;code-keyword&quot;&gt;this&lt;/span&gt;-&amp;gt;_elements, $offset, $length, &lt;span class=&quot;code-keyword&quot;&gt;true&lt;/span&gt;); &lt;span class=&quot;code-comment&quot;&gt;// preserve keys
&lt;/span&gt;}
&lt;/pre&gt;
&lt;/div&gt;&lt;/div&gt;</description>
                <environment></environment>
            <key id="11739">DCOM-17</key>
            <summary>Add Collection::slice($offset, $length)</summary>
                <type id="4" iconUrl="http://www.doctrine-project.org/jira/images/icons/issuetypes/improvement.png">Improvement</type>
                                <priority id="3" iconUrl="http://www.doctrine-project.org/jira/images/icons/priorities/major.png">Major</priority>
                    <status id="5" iconUrl="http://www.doctrine-project.org/jira/images/icons/statuses/resolved.png">Resolved</status>
                    <resolution id="1">Fixed</resolution>
                                <assignee username="beberlei">Benjamin Eberlei</assignee>
                                <reporter username="beberlei">Benjamin Eberlei</reporter>
                        <labels>
                    </labels>
                <created>Sun, 8 Aug 2010 11:30:23 +0000</created>
                <updated>Fri, 14 Jan 2011 05:39:16 +0000</updated>
                    <resolved>Tue, 24 Aug 2010 15:49:22 +0000</resolved>
                            <version>2.0.0-BETA4</version>
                                <fixVersion>2.0.0-RC1</fixVersion>
                                <component>Collections</component>
                        <due></due>
                    <votes>0</votes>
                        <watches>0</watches>
                        <comments>
                    <comment id="13864" author="beberlei" created="Sun, 8 Aug 2010 11:32:03 +0000"  >&lt;p&gt;Updated preserve paragraph&lt;/p&gt;</comment>
                    <comment id="14058" author="beberlei" created="Tue, 24 Aug 2010 15:49:22 +0000"  >&lt;p&gt;Implemented&lt;/p&gt;</comment>
                    <comment id="15142" author="jpieper" created="Fri, 14 Jan 2011 05:39:16 +0000"  >&lt;p&gt;Is there any reason why slice() returns an array although methods like filter() and map() return an instance of Doctrine\Common\Collections\ArrayCollection?&lt;/p&gt;</comment>
                </comments>
                    <attachments>
                </attachments>
            <subtasks>
        </subtasks>
        </item>
</channel>
</rss>