Skip to content

Commit 73b92d9

Browse files
committed
Added new resolveConnector method
1 parent 6ec5901 commit 73b92d9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

src/Http/SaloonRequest.php

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,18 @@ private function bootConnector(): void
107107
throw new SaloonInvalidConnectorException;
108108
}
109109

110-
$this->setConnector(new $this->connector);
110+
$this->setConnector($this->resolveConnector($this->connector));
111+
}
112+
113+
/**
114+
* Resolve the connector.
115+
*
116+
* @param string $connectorClass
117+
* @return SaloonConnector
118+
*/
119+
protected function resolveConnector(string $connectorClass): SaloonConnector
120+
{
121+
return new $connectorClass;
111122
}
112123

113124
/**

0 commit comments

Comments
 (0)