PhileCMS / Phile

A flat file CMS with a swappable parser and template engine.
https://philecms.github.io/
Other
257 stars 49 forks source link

Move all of core into Phile\Core #313

Closed Schlaefer closed 6 years ago

Schlaefer commented 6 years ago

The main purpose is to put responsibility for Phile's core functionality into one class. Improve readability, comprehension and support future changes in the core.

Phile\Core has two public methods for initialisation and request processing now. In the class you are able see the flow within the core by reading the protected methods from top to bottom. Methods are more concise and don't rely on shared class properties, which are hard to keep track of during the lifetime of the class.

The bootstrap.php file isn't a class anymore but a simple include for the actual basic bootstrap requirements: defines() and the essential autoloader setup.

Some slight changes in Event and PluginRepository are made to support the changes in the Core. Test cases are updated. As far as I can tell this should be a drop-in replacement.

PS: Instead of looking at the diff it's easier to understand looking at the new Core and bootstrap.php as whole.

Schlaefer commented 6 years ago

Moved on to #316