Hi...

Originally Posted by
Travis S
I don't see where you're going with Key* though? I'm thinking ValueProxy and MutableValueProxy. Explains exactly what it is and what it does. Thoughts?
No it doesn't, it describes an imlementation. Here is the context...
PHP Code:
class DataSpace implements KeyLookup { ... }
It has to read well as part of an implements line...
PHP Code:
class DataSpace implements Keyed { ... }
class DataSpace implements KeyValues { ... }
class DataSpace implements KeyIndexed { ... }
See what I mean?
By the way, your post earlier about a read only interface won't work without a lot of machinations. For example, say you have this...
PHP Code:
interface Gettable { }
interface SettableAndGettable implements Gettable { }
No matter which one you type hint with, you have not enforced read only behaviour.
You would have to have...
PHP Code:
interface Gettable { }
interface Settable {}
class SomethingSettableAndGettable implements Gettable, Settable { }
It really isn't worth the effort is it? Especially when you can all too easily hack around PHP to get what you want anyway. I don't think it's worth it.
Regarding your template droppable version, that should be called Templateable...
PHP Code:
class Person implements Templateable { ... }
Keeps it separate from Keyed and emphasizes what a very specialist interface it is.
yours, Marcus
Bookmarks