note 119785 rejected from class.ds-vector by cmb

From: Date: Wed, 24 Aug 2016 22:40:57 +0000
Subject: note 119785 rejected from class.ds-vector by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-206383@lists.php.net to get a copy of this message
Note Submitter: fgheorghe at grosan dot co dot uk ---- 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.

« previous php.notes (#206383) next »