LevareCMS/modulemanager — pull request #5 by stevemo (2013-06-18 03:20:10+00:00)
Title: Change file loading logic

First of all Thanks for this great package. I would like you to review these changes and see if they fit in your package idea.

1- When the Modules.php is instantiated no more scanning Modules folder for write permission. this is called later on if needed.
2- in the before method i have created a new method called loadModuleFile(). this class is responsible to get the module.json file and if it doesn't exist it will try to create it. then it will called 2 additional method loadRequiredFiles and registerGlobalNamspace.
3- also used property_exists() instead of isset in loadRequiredFiles and registerGlobalNamspace in case those key do not exist.

thanks and great work!