I am developing a class which will use credentials to obtain some information from a remote source. Those credentials are not going to change often, so they can be a part of the configuration. My question is, what is a better practice in PHP OOP:
The class reads those credentials from the configuration on construction.
public function __construct() { //get credentials from database, etc... }
The caller class provides them on construction as arguments.
public function __construct($credentials) { //save them for later use }