Skip to content

Commit

Permalink
FIX Uneccessary class replacement
Browse files Browse the repository at this point in the history
Overly complex code example.
  • Loading branch information
micmania1 committed Jan 8, 2015
1 parent e134c9b commit a02adf6
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions docs/en/02_Developer_Guides/05_Extending/05_Injector.md
Expand Up @@ -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();
Expand Down Expand Up @@ -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]

0 comments on commit a02adf6

Please sign in to comment.