Skip to content

Commit

Permalink
Remove Client Context factory and Factory Awares/Templates from docs
Browse files Browse the repository at this point in the history
  • Loading branch information
sagikazarmark committed Nov 16, 2015
1 parent cffbd09 commit 120aaeb
Showing 1 changed file with 0 additions and 22 deletions.
22 changes: 0 additions & 22 deletions docs/message-factory.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ This package provides interfaces for PSR-7 factories including:
- `StreamFactory`
- `UploadedFileFactory` - WIP (PRs welcome)
- `UriFactory`
- `ClientContextFactory` (Combines `MessageFactory`, `StreamFactory` and `UriFactory`)


A [virtual package](virtual-package.md) ([php-http/message-factory-implementation](https://packagist.org/providers/php-http/message-factory-implementation)) MAY be introduced which MUST be versioned together with this package.
Expand All @@ -36,24 +35,3 @@ class MyFactory implements SomeFactory

}
```


### Factory awares and templates

For each factory there is a helper interface and trait to ease injecting them into other objects (such as HTTP clients).

An example:

``` php
use Http\Message\SomeFactoryAware;
use Http\Message\SomeFactoryAwareTemplate;

class HttpClient implements SomeFactoryAware
{
use SomeFactoryAwareTemplate;
}

$client = new HttpClient();
$someFactory = $client->getSomeFactory();
$client->setSomeFactory($someFactory);
```

0 comments on commit 120aaeb

Please sign in to comment.