Skip to content

Commit

Permalink
Add possibility to pass config in static method
Browse files Browse the repository at this point in the history
  • Loading branch information
aivchen committed Jan 23, 2019
1 parent 396befb commit 0fa4c2a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ public function __construct(Config $config, ClientInterface $client = null)
$this->urlConverter = new UrlConverter($config->getPrivateKey());
}

public static function create($privateKey)
public static function create($privateKey, array $config = [])
{
$config = Config::create(['private_key' => $privateKey]);
return new self($config);
$config = array_merge($config, ['private_key' => $privateKey]);
return new self(Config::create($config));
}

public function update($url, $contentType = UrlConverter::CONTENT_TYPE_HTML)
Expand Down

0 comments on commit 0fa4c2a

Please sign in to comment.