Remove alias, deprecate, and set methods from manager?
Closed this issue · 2 comments
Initially, I had added alias()
, deprecate()
, set()
, and get()
methods to the Manager so people could do those things in the code as their application is starting up. However, it complicates the manager, especially when we want to allow namespaces and imports in files but not code #6. Plus, I'm worried the timing might be confusing. If a service requires something but you haven't defined it yet, it will fail.
This will require refactoring the load filesystem process, but I think we can change the magic $g
variable from an instance of the Manager
to an instance of a new object, Jstewmc\Gravity\File\Data\Loaded
or something like that, where the methods used in the file are private methods of the object.
Basically, a gravity file would just create a virtual version of itself.