function Psr17Factory::setFactory
9 calls to Psr17Factory::setFactory()
- Psr17Factory::createRequest in vendor/
php-http/ discovery/ src/ Psr17Factory.php - Psr17Factory::createResponse in vendor/
php-http/ discovery/ src/ Psr17Factory.php - Create a new response.
- Psr17Factory::createServerRequest in vendor/
php-http/ discovery/ src/ Psr17Factory.php - Psr17Factory::createStream in vendor/
php-http/ discovery/ src/ Psr17Factory.php - Create a new stream from a string.
- Psr17Factory::createStreamFromFile in vendor/
php-http/ discovery/ src/ Psr17Factory.php - Create a stream from an existing file.
File
-
vendor/
php-http/ discovery/ src/ Psr17Factory.php, line 156
Class
- Psr17Factory
- A generic PSR-17 implementation.
Namespace
Http\DiscoveryCode
private function setFactory($factory) {
if (!$this->requestFactory && $factory instanceof RequestFactoryInterface) {
$this->requestFactory = $factory;
}
if (!$this->responseFactory && $factory instanceof ResponseFactoryInterface) {
$this->responseFactory = $factory;
}
if (!$this->serverRequestFactory && $factory instanceof ServerRequestFactoryInterface) {
$this->serverRequestFactory = $factory;
}
if (!$this->streamFactory && $factory instanceof StreamFactoryInterface) {
$this->streamFactory = $factory;
}
if (!$this->uploadedFileFactory && $factory instanceof UploadedFileFactoryInterface) {
$this->uploadedFileFactory = $factory;
}
if (!$this->uriFactory && $factory instanceof UriFactoryInterface) {
$this->uriFactory = $factory;
}
return $factory;
}