Initiate and get library classes.
eFactory serves 3 major tasks:
• Initiates (constructs) not-initiated classes, stores them into the registry and returns an object.
• Returns a class object from the registry for already initiated classes.
• Removes the need of using the global keyword.
Most common methods of eFactory.
To call an object ($elxis for example) inside a function that initiated outside of it you would do:
With eFactory you do it like that:
Or, alternatively, by using the chaining methods style (dont do it for repeated object as it will be slower):
eFactory also makes sure that you will always get the same instance of the class (as it calls internally the Elxis Registry).
Κατασκευάστε μηχανές που επεκτείνουν την αναζήτηση του elxis οπουδήποτε μπορείτε να φανταστείτε