Why Do Configurable Classes Not Use Configuration Files (like JSON)?
Perhaps you are wondering why Magium uses per-class include() files to handle configuration changes rather than using a proper configuration file. In other words, why does Magium do this:
<?php
/* @var $this Magium\Magento\Themes\Magento19\ThemeConfiguration */
$this->baseUrl = 'http://mysite';
instead of this:
{
"baseUrl": "http://mysite/"
}
or even this
{
"Magium\Magento\Themes\Magento19\ThemeConfiguration": {
"baseUrl": "http://mysite/"
}
}
The reasoning for these other approaches this is simple; it would centralize the configuration. So why is the configuration all over the place?
The purpose is to allow developers to have some parts of the configuration static between developers, such as a theme configuration option, where as others, like your test login, could be different. It is easy to believe that enforcing standards across developers would be preferred. But I think that the argument can be made that building a system that actually allows for some entropy will be a little closer to real life.