-
-
Notifications
You must be signed in to change notification settings - Fork 513
Factories reboot #2093
Copy link
Copy link
Closed
Labels
Description
Is your feature request related to a problem? Please describe.
The requirements for Factories has changed a lot since the long discussion on #1793 and #1219 :
- Factories will no longer be exposed publicly. They will constitute a completely internall API to be used by the
Timber\Timberclass. - Instead of exposing Factories externally, we're exposing a small set of filters that will be used inside Factories to instantiate the correct class for a given post type, taxonomy, etc.
- The requirements for Factories is now being driven by the new API proposal for
Timber::get_posts()and friends.
Goals
The goals for implementing Factories are:
- To provide a centralized layer for instantiating
Timber\Coreinstances (Post,Term, etc.) and their corresponding collection classes (e.g.PostCollection). - To eventually replace
PostGetteretc., to be called directly fromTimber::get_*methods (e.g.::get_posts). - To provide a centralized place to implement filters like
timber/post/classmapas described in the Class Map proposal. - To incorporate the best ideas from WIP: Feature/interfaced object factories #1793 and Object factory usage #1219 in a way that matches up with the new API proposal
Reactions are currently unavailable