|
Posted by Tony Marston on 12/01/06 09:26
"Michael Fesser" <netizen@gmx.de> wrote in message
news:m8oum29ju6gvvvt9h3l70aqnbi6i7pg2m6@4ax.com...
> .oO(Tony Marston)
>
>>That just tells me what interfaces ARE, but it certainly does not say that
>>interfaces are REQUIRED. It is possible to define a class method and
>>access
>>it directly WITHOUT going through an interface, therefore an interface IS
>>NOT NECESSARY.
>
> Forget it. Obviously you haven't understood what interfaces in PHP are
> used for and what you can do/ensure with them.
My point is that in PHP interfaces are OPTIONAL, not MANDATORY. It is a
simpe point which you cannot disprove, so why are you continuing to argue
about it?
> Just an example: Without
> these interfaces it wouldn't be possible to use 'foreach' to iterate
> over any arbitrary object:
>
> foreach ($directory as $file) {...}
> foreach ($resultSet as $record) {...}
>
> Micha
With PHP 5 it is possible to use 'foreach' on an object without the use of
interfaces, so your argument is not valid.
--
Tony Marston
http://www.tonymarston.net
http://www.radicore.org
Navigation:
[Reply to this message]
|