Ferreteria/v0.6/sys/Registry
< Ferreteria | v0.6
Jump to navigation
Jump to search
|
Registries different types and how they work
|
There are two primary types of "registry": class and object. Both of these are basically just arrays in which stored items follow a specific rule-set. In general, though, you have a list of things -- either classes or objects -- where the specific thing needed depends on context and identity.
The exact means of determining the context is perhaps the piece with the most variation in how it is implemented. It can be done by separate Registry classes or by using a "class slug" in a master-array.
The identity is simpler: the Registry (assuming the context is already specified) accepts a slug-string and returns the thing requested.