Merge pull request #3768 from micmania1/patch-7

FIX Uneccessary class replacement
This commit is contained in:
Will Rossiter 2015-01-08 21:33:09 +13:00
commit 146b4689b8

View File

@ -125,15 +125,13 @@ An example using the `MyFactory` service to create instances of the `MyService`
Injector:
MyService:
factory: MyFactory
MyFactory:
class: MyFactoryImplementation
**mysite/code/MyFactoryImplementation.php**
**mysite/code/MyFactory.php**
:::php
<?php
class MyFactoryImplementation implements SilverStripe\Framework\Injector\Factory {
class MyFactory implements SilverStripe\Framework\Injector\Factory {
public function create($service, array $params = array()) {
return new MyServiceImplementation();
@ -243,4 +241,4 @@ This is useful when writing test cases, as certain services may be necessary to
## API Documentation
* [api:Injector]
* [api:Factory]
* [api:Factory]