Liturgical-Calendar / LiturgicalCalendarAPI

A PHP script / API endpoint that will generate the Roman Catholic liturgical calendar for any given year, calculating the mobile festivities and the precedence of solemnities, feasts, memorials...
Apache License 2.0
35 stars 9 forks source link

implement namespacing #216

Closed JohnRDOrazio closed 1 month ago

JohnRDOrazio commented 1 month ago

This project is not currently implementing namespacing.

This is not a best practice in PHP coding.

To better follow PSR-12 standards, we should:

1) keep all classes in their own separate files 2) namespace all classes under the LitCal namespace 3) implement autoloading rather than including all required classes with include or require statements

And the API endpoints can be set to simple paths rather than PHP files, for example: -> https://litcal.johnromanodorazio.com/api/dev/ instead of https://litcal.johnromanodorazio.com/api/dev/LitCalEngine.php

-> https://litcal.johnromanodorazio.com/api/dev/regionaldata instead of https://litcal.johnromanodorazio.com/api/dev/LitCalRegionalData.php

etc.

JohnRDOrazio commented 1 month ago

started working on this in the namespaced branch

JohnRDOrazio commented 1 month ago

fixed in PR #217 and commits 090cda8bbc9ed6d2a4ac18fc1066418316048481...58f54f6aeadc7d0ea2c1239f663144a02ecb872d