mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
FIX Uneccessary class replacement
Overly complex code example.
This commit is contained in:
parent
e134c9b7c9
commit
a02adf6854
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user