Skip to content

Commit

Permalink
Fix some typos
Browse files Browse the repository at this point in the history
  • Loading branch information
jdreesen committed Sep 6, 2015
1 parent 308c2cf commit e8a62d6
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![Build Status](https://travis-ci.org/PHP-DI/PHP-DI.png?branch=master)](https://travis-ci.org/PHP-DI/PHP-DI) [![Coverage Status](https://coveralls.io/repos/PHP-DI/PHP-DI/badge.png?branch=master)](https://coveralls.io/r/PHP-DI/PHP-DI?branch=master)

PHP-DI is license under the MIT License.
PHP-DI is licensed under the MIT License.


## Set up
Expand Down
4 changes: 2 additions & 2 deletions doc/definition-overriding.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ layout: documentation

A simple application usually takes advantage of one or two *definition sources*: autowiring (or annotations) + a definition file/array.

However in more complex application or modular systems you might want to have multiple definition files (e.g. one per modules/bundles/plugins/…). In this case, PHP-DI provides a clear and powerful system to **override and/or extend definitions**.
However in more complex applications or modular systems you might want to have multiple definition files (e.g. one per modules/bundles/plugins/…). In this case, PHP-DI provides a clear and powerful system to **override and/or extend definitions**.

## Priorities of definition sources

Expand Down Expand Up @@ -112,7 +112,7 @@ return [

```php
return [
'array' => add([
'array' => DI\add([
DI\get(NewEntry::class),
]),
];
Expand Down
4 changes: 2 additions & 2 deletions doc/how-it-works.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ A container instance has the following sub-components:

### Definitions

A definition defines what is an entry:
A definition defines what an entry is:

- **a simple value** (string, number, object instance…): `ValueDefinition`
- **a factory/callable returning the value**: `FactoryDefinition`
- **a definition of an entry alias**: `AliasDefinition`
- **a definition of a class**: `ObjectDefinition`
- **a definition of an environment variable**: `EnvironmentVariableDefinition`

The last type (class definition) describes how the container should create a class instance (what parameters the constructor takes, …).
The class definition describes how the container should create a class instance (what parameters the constructor takes, …).
4 changes: 2 additions & 2 deletions doc/lazy-injection.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ If you define an object as "lazy", PHP-DI will inject:
- the object, if it has already been created
- or else a **proxy** to the object, if it is not yet created

The proxy is a special kind of object that **looks and behave exactly like the original object**, so you can't tell the difference. The proxy will instantiate the original object only when needed.
The proxy is a special kind of object that **looks and behaves exactly like the original object**, so you can't tell the difference. The proxy will instantiate the original object only when needed.

Creating a proxy is complex. For this, PHP-DI relies on [ProxyManager](https://github.com/Ocramius/ProxyManager), the (amazing) library used by Doctrine, Symfony and Zend.

Expand All @@ -60,7 +60,7 @@ class Foo
}
}

$container->set('Foo', \DI\object()->lazy);
$container->set('Foo', \DI\object()->lazy());

// $proxy is a Proxy object, it is not initialized
// It is very lightweight in memory
Expand Down

0 comments on commit e8a62d6

Please sign in to comment.