Use case: I'm attempting to use this brilliant package to build a monitoring system for WP, and as such need to be able to set WORDPRESS_URL at runtime. In a single 'request', we may want to contact a number of different WordPress instances.
Adding methods to set the hostname etc. at runtime doesn't really fit well with the singleton / facade based approach IMO, but perhaps I've overlooked something?
Instead, I'm using something like:
$client = new Client($the_wordpress_url);
$wp = new WordPress($client);
It would be really nice if we could overload the BaseWordPress constructor to allow passing a string, which could be passed into the Client constructor - resulting in the tidier form of:
$wp = new WordPress($the_wordpress_url);
I believe that change wouldn't affect the singleton-style functionality at all.
I'm very aware this could be completely the wrong approach completely though.
Thanks for your time and effort - it's greatly appreciated.
Use case: I'm attempting to use this brilliant package to build a monitoring system for WP, and as such need to be able to set
WORDPRESS_URLat runtime. In a single 'request', we may want to contact a number of different WordPress instances.Adding methods to set the hostname etc. at runtime doesn't really fit well with the singleton / facade based approach IMO, but perhaps I've overlooked something?
Instead, I'm using something like:
It would be really nice if we could overload the
BaseWordPressconstructor to allow passing a string, which could be passed into theClientconstructor - resulting in the tidier form of:I believe that change wouldn't affect the singleton-style functionality at all.
I'm very aware this could be completely the wrong approach completely though.
Thanks for your time and effort - it's greatly appreciated.