A class can now extend the Factory class and use all of its properties.
Properties like the layout system can be called like $this->layout, when extended. Just like the old days with the Bus abstract class.
Advantage of this system is that you don't require the use of extending the Factory class. Calling the factory for just one use is also possible.
Closes#93.
Now it only features one (simpler) ORM, which is the ConfigFileORM.
If a new type of config should be added, it should be done through models.
Unit tests for the basic config class have been implemented.
The Factory class is the central point for class communication in FuzeWorks. When someone needs to load, for instance, the layout class, one has to do the following:
$factory = Factory::getInstance();
$layout = $factory->layout;
The Factory class allows the user to replace dependencies on the fly. It is possible for a class to replace a dependency, like Logger, on the fly by calling the $factory->newInstance('Logger'); or the $factory->setInstance('Logger', $object); This allows for creative ways to do dependency injection, or keep classes
separated.
It is also possible to load a cloned instance of the Factory class, so that all properties are independant as well,
all to suit your very needs.
- Modules can now be loaded using routes by adding a routes[] array to the moduleInfo.php. When it matches, the module gets loaded, and a route() function in the main class gets called. (Fixes#79)
- Composer can now load from a different file
- License headers have been added to all core files (Fixes#66)
- Table model has been renamed to sqltable. Interpret model has been removed
- layoutLoadViewEvent added
- Controllers now extend the \FuzeWorks\ControllerAbstract class
- Controllers are now in the \Application\Controller namespace
- Models are now in the \Application\Model namespace
- Events are now in the \FuzeWorks\Event namespace
- Moved some classes in a different namespace for a better overview
- Events can now properly load function listeners (fixes#81)
- Documentation added to more classes. (Partially fixes#58)
- Added replace() command to DatabaseUtils Abstract Model
- Added more unit tests for router, query and events