I use a config file to hold important data like usernames and passwords. On script startup, I read this file and initialize all classes needed for the project (e.g. create the connection to the Database with username/password from the config) to run. (So I have all sensitive data in a centralized file, and not scattered through the complete project.)
I now would like to see any kind of possibility to "announce" the credentials of the MPWS to the Maniaplanet classes (i.e. to the HTTPClient class), so that I instanciate any Maniaplanet class without worrying about the credentials anymore. (My first idea would be a static method HTTPClient::setCredentials($username, $password), which saves the username and password, and using them in the constructor if no other values are given.)
ADD:
As I looked through the files, I found this comment:
So what about finally fixing this todo?HTTPClient::__construct() wrote:// TODO Try to load the credentials from a ManiaLib config class for easy inclusion in ManiaLib projects
