Does anyone know how could I use getConfig() in a class that does not extend PluginBase? Example: Example.php and ExampleCommand.php where Example extends PluginBase and ExampleCommand extends Command, how do I set/get config from ExampleCommand.php? Thanks!
Assuming you mean PluginBase::getConfig() which returns a Config object, you can simply create a new object which links the the same file by setting a variable equal to the new object (assuming you know the path to the config) Another, probably easier, method would also be to pass your PluginBase object to your second class and access your config from there.