mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #3768 from micmania1/patch-7
FIX Uneccessary class replacement
This commit is contained in:
commit
146b4689b8
@ -125,15 +125,13 @@ An example using the `MyFactory` service to create instances of the `MyService`
|
|||||||
Injector:
|
Injector:
|
||||||
MyService:
|
MyService:
|
||||||
factory: MyFactory
|
factory: MyFactory
|
||||||
MyFactory:
|
|
||||||
class: MyFactoryImplementation
|
|
||||||
|
|
||||||
**mysite/code/MyFactoryImplementation.php**
|
**mysite/code/MyFactory.php**
|
||||||
|
|
||||||
:::php
|
:::php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
class MyFactoryImplementation implements SilverStripe\Framework\Injector\Factory {
|
class MyFactory implements SilverStripe\Framework\Injector\Factory {
|
||||||
|
|
||||||
public function create($service, array $params = array()) {
|
public function create($service, array $params = array()) {
|
||||||
return new MyServiceImplementation();
|
return new MyServiceImplementation();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user