2007/10/2, Alexey Zakhlestin <[EMAIL PROTECTED]>:
>
> On 10/1/07, Martin Alterisio <[EMAIL PROTECTED]> wrote:
> > Sorry to bother, I have a few questions on this matter.
> > How will this impact on the SPL ArrayAccess and related interfaces and
> > objects?
> > Will there be an interface to this functionality?
> > If so, how will ranges be passed through to this interface?
> > Will this be consistent with substr() and array_slice() if used with an
> > ArrayAccess implementation?
>
> I guess it can be made to work with current ArrayAccess, but result
> will be quite slow. (it will need to query requested elements
> one-by-one and recombine those in array)
>
> But adding another interface can solve the problem. Ranges can be
> passed exactly the way they are passed to [] operator
>
> public function rangeGet($start, $length);
> public function rangeSet($start, $length, array $data);
>
>
> --
> Alexey Zakhlestin
> http://blog.milkfarmsoft.com/
>

In that case rangeSet shouldn't have the third argument type hinted. The
supplied data could be an ArrayAccess implementor.

Reply via email to