Interfaces
are type declarations. type is a set of values, plus a set of operations that can be performed on them from the outside. the private method does not fit into this picture.
interface T { public function f(array $a); } interface U { public function g(T $t); } class C implements U { public function g(T $t) { ... $x = $t->f(); ... } }
Interfaces
useful because they describe, well, the interfaces of objects. how objects communicate with their environment.
Now let's say T::f can be declared private. how would this be useful for other objects? it will not be called from outside, it will not be part of its interface.
just somebody Dec 09 '09 at 20:37 2009-12-09 20:37
source share