| @@ 35-41 (lines=7) @@ | ||
| 32 | * @param IpstackClientInterface $ipstack_client |
|
| 33 | * @param CacheItemPoolInterface $cache PSR-6 Cache ItemPool |
|
| 34 | */ |
|
| 35 | public function __construct( IpstackClientInterface $ipstack_client, CacheItemPoolInterface $cache, LoggerInterface $logger = null, string $loglevel_name = "info" ) |
|
| 36 | { |
|
| 37 | $this->ipstack_client = $ipstack_client; |
|
| 38 | $this->loglevel_name = $loglevel_name; |
|
| 39 | $this->cache = $cache; |
|
| 40 | $this->setLogger( $logger ?: new NullLogger ); |
|
| 41 | } |
|
| 42 | ||
| 43 | ||
| 44 | /** |
|
| @@ 103-110 (lines=8) @@ | ||
| 100 | * @param array $request_attributes Optional: Map ipstack fields to request attributes |
|
| 101 | * @param LoggerInterface|null $logger Optional: PSR-3 Logger |
|
| 102 | */ |
|
| 103 | public function __construct( IpstackClientInterface $ipstack_client, string $ip_address_attribute = null, array $ipstack_attributes = array(), LoggerInterface $logger = null ) |
|
| 104 | { |
|
| 105 | $this->ipstack_client = $ipstack_client; |
|
| 106 | $this->ip_address_attribute = $ip_address_attribute; |
|
| 107 | $this->ipstack_attributes = $ipstack_attributes; |
|
| 108 | ||
| 109 | $this->setLogger( $logger ?: new NullLogger ); |
|
| 110 | } |
|
| 111 | ||
| 112 | ||
| 113 | /** |
|