On 09/21/2016 08:57 PM, Stefano Torresi wrote:
As far as I can tell, the problem is that currently the so called
LinkCollectionInterface describes two methods which, as per docblocks,
"return a collection".
So we have something called collection which in turn returns
collections; not ideal.
Calling it "Catalog" doesn't cut it, in my opinion, because the
ambiguity remains: "catalog" can easily be interpreted as a synonym of
"collection".
"Collector" doesn't cut it either, because I would expect it to
provide some kind of command (i.e. "collect()"), not queries.
Now I'm not big on naming, but something like LinksProvider or
LinkCollectionProvider would probably communicate the intent more
accurately.
Then again, the presence of EvolevableLinkCollectionInterface makes it
even more unclear whether or not we're talking about something that
is-a collection or has-a collection.
I understand the need for this interfaces, but the current naming is
confusing.
I don't know better, I'll let you folks brainstorm on this.
Cheers.
Matthew and I discussed this a bit. LinksProviderInterface is the first
suggestion that for lack of a less emotionally-based term "clicks", and
doesn't become even more confusing. We're tempted to add that to the
poll and restart it. :-) (I saw you posted it there, too.) As you
note, though, EvolvableLinkProviderInterface would be a bit odd.
Thoughts from others?
Really, the core issue is that the object in question contains links,
and MAY allow you to add more to them, but ALSO contains other stuff
that isn't links. So it is a collection of links, but doesn't have the
exclusivity that "collection" has come to have. (Viz, it's not a fancy
OOP array of links.) That's really the problem; the name "collection"
would have likely been fine 3 years ago, but these days we expect more
of that word but have no word to replace its previous, more limited
meaning. :-/
--Larry Garfield
--
You received this message because you are subscribed to the Google Groups "PHP
Framework Interoperability Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to php-fig+unsubscr...@googlegroups.com.
To post to this group, send email to php-fig@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/php-fig/36efa53e-be32-56fa-6a76-ee2f65208245%40garfieldtech.com.
For more options, visit https://groups.google.com/d/optout.