public function __construct(LoggerInterface $loggerInterface = null) { $this->addHeader('Content-type', 'application/json'); if (!$loggerInterface) { $loggerInterface = new Logger(); } parent::__construct(self::MAGIC_PREFIX, $loggerInterface); }
/** * 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); }