Req #57205 [Asn->Csd]: Request for additional SplObjectStorage methods.
| From: | levim@php.net | Date: | Fri, 28 Mar 2014 19:48:22 +0000 |
| Subject: | Req #57205 [Asn->Csd]: Request for additional SplObjectStorage methods. | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-184951@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=57205&edit=1
ID: 57205
Updated by: levim@php.net
Reported by: wb at pro-net dot co dot uk
Summary: Request for additional SplObjectStorage methods.
-Status: Assigned
+Status: Closed
Type: Feature/Change Request
Package: SPL related
Operating System: *
PHP Version: 5.*
Assigned To: helly
Block user comment: N
Private report: N
New Comment:
Closing. This is infeasible to do given the current implementation and a new implementation would
likely cause backwards compatibility breaks.
Previous Comments:
------------------------------------------------------------------------
[2006-09-01 05:38:34] wb at pro-net dot co dot uk
Thanks for taking the time to consider the request.
I eagerly await your decision :)
------------------------------------------------------------------------
[2006-08-31 21:34:55] helly@php.net
Right now this is impossible as we store them by hash codes. I need to think about it.
------------------------------------------------------------------------
[2006-08-30 11:53:22] wb at pro-net dot co dot uk
Description:
------------
I would just like to propose the addition of the following methods to the SplObjectStorage class.
These methods allow you to specify the object attachment position and will therefore affect the
order the objects are returned when iterating over the SplObjectStorage object.
/**
* Attach an object before an existing object.
*
* If $new is already attached then it position is moved.
* If $ref is not attached an exception is thrown.
*/
public function attachBefore($new, $ref);
/**
* Attach an object after an existing object.
*
* Works as attachBefore().
*/
public function attachAfter($new, $ref);
/**
* Attach an object to the front.
*/
public function attachFirst($obj);
Reproduce code:
---------------
N/A
Expected result:
----------------
N/A
Actual result:
--------------
N/A
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=57205&edit=1