예제 #1
0
 public function __construct(LoggerInterface $loggerInterface = null)
 {
     $this->addHeader('Content-type', 'application/json');
     if (!$loggerInterface) {
         $loggerInterface = new Logger();
     }
     parent::__construct(self::MAGIC_PREFIX, $loggerInterface);
 }
예제 #2
0
 /**
  * Request constructor.
  *
  * @param string          $access_token
  * @param LoggerInterface $logger
  */
 public function __construct($access_token = null, $logger = null)
 {
     if (!$logger && !self::$logger) {
         $logger = new Logger();
     }
     if ($access_token) {
         $this->setAccessToken($access_token);
     }
     parent::__construct(self::MAGIC_PREFIX, $logger);
 }