note 119785 added to class.ds-vector
| From: | fgheorghe at grosan dot co dot uk | Date: | Wed, 24 Aug 2016 15:11:58 +0000 |
| Subject: | note 119785 added to class.ds-vector | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-206382@lists.php.net to get a copy of this message | ||
It would be great if this class would not be final. A use case where I would want to extend the
functionality, would be to enforce Vector items of a certain type - and emulate Java generics. I.e.:
public mixed get ( int $index ) : ClassName
public void set ( int $index , mixed $value ) : ClassName
Thus ensuring my vectors are made strictly of a certain type. I can emulate this behaviour with
\ArrayAccess and \Iterator, but given this library is far more efficient I would prefer it over
these two interfaces, when defining my datasets.
----
Server IP: 92.48.119.85
Probable Submitter: 80.193.72.4
----
Manual Page -- http://php.net/manual/en/class.ds-vector.php
Edit -- https://master.php.net/note/edit/119785
Del: integrated -- https://master.php.net/note/delete/119785/integrated
Del: useless -- https://master.php.net/note/delete/119785/useless
Del: bad code -- https://master.php.net/note/delete/119785/bad+code
Del: spam -- https://master.php.net/note/delete/119785/spam
Del: non-english -- https://master.php.net/note/delete/119785/non-english
Del: in docs -- https://master.php.net/note/delete/119785/in+docs
Del: other reasons-- https://master.php.net/note/delete/119785
Reject -- https://master.php.net/note/reject/119785
Search -- https://master.php.net/manage/user-notes.php