There's been lots more talk on IRC about converting everything to use the new Vocabulary / Term structure and how the fine details should work. In the meantime I've had more time to flesh out exactly how I would like to see the system work and I've put together some semi-pseudo code examples to explain it. The public Gist is here: http://gist.github.com/630321
This system would see Term and Vocabulary as base classes that could be used directly, but are easily extended to encapsulate all their functionality: Tag extends Term and Tags extends Vocabulary. There was some question previously about what would replace the current Tags class, which extends ArrayObject and represents a "set" of tags (including methods for getting a set and performing other operations on them in bulk). My proposal is: nothing. We don't need a pseudo-array to represent a set of Terms related to an object, we just need a normal array. That frees up Tags to extend Vocabulary and eliminates the confusion of whether the Tags::delete() method refers to the Tags Vocabulary or individual tags within the Vocabulary. The best benefit my proposed system would have is that it treats Tags *exactly* like a plugin would treat a vocabulary it's creating. How can we expect anyone to implement vocabularies the "right" way in a plugin if the only vocabulary in core is so convoluted? They don't have to be, they're just a basic term (not even heirarchical, required, etc.), so this approach has greatly confused me (as we discussed in my last post). I think I've done a pretty good job of explaining how everything would work, where particular methods would go, etc. in the comments of the example, so I'd love to hear responses from anyone who has a minute or thinks they spot a problem.
smime.p7s
Description: S/MIME cryptographic signature
