Jump to content

JohanM

New Members
  • Content Count

    2
  • Joined

  • Last visited

Community Reputation

0 Neutral

About JohanM

  • Rank
    Newbie
  1. Hi guys! I have a specific requirement and need some help Say i have an external api library with Client class looking like this: class Client { some constants.. private props.., __construct() public static function create($url) { some code } public static function authenticate($token) { some code } ...dozen other methods } Current way of instantiating in every single other class where i need the client: use Client; MyFetchController { private $client; public function __construct() { $this->client = Client::cre
  2. Hi guys! I have a specific requirement and need some help Say i have an external api library with Client class looking like this: class Client { some constants.. private props.., __construct public function create($url) { some code } public function authenticate($token) { some code } ...dozen other methods } Current way of instantiating in every single other class where i need the client: use Client; MyFetchController { private $client; public function __construct() { $this->client = Client::create(getenv('URL'))->authenticate(getenv('TOKEN'))
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.