Пример #1
0
 public function __construct()
 {
     $this->descriptor = Container::get($this->service);
 }
Пример #2
0
 /**
  * @param $key
  */
 public static function setApiKey($key)
 {
     $descriptor = new ServiceDescriptor($key);
     Container::register($descriptor);
 }
 /**
  * @param $token
  * @param $key
  * @param bool $production
  */
 public static function setCredentials($token, $key, $production = false)
 {
     $descriptor = new ServiceDescriptor($token, $key, $production);
     Container::register($descriptor);
 }