Development

Changeset 19710

You must first sign up to be able to contribute.

Changeset 19710

Show
Ignore:
Timestamp:
06/30/09 17:15:05 (4 years ago)
Author:
Russ
Message:

Grammatical/typo fixes

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • components/dependency_injection/trunk/doc/01-Dependency-Injection.markdown

    r19700 r19710  
    1313>skip this chapter and start reading the next one. 
    1414 
    15 Dependency Injection is probably one of the most dead simple design pattern. 
    16 And odds are you have probably already used Dependency Injection. But it is 
    17 also one of the most difficult one to explain well. This is probably partly 
     15Dependency Injection is probably one of the most dead simple design patterns, 
     16and odds are you have already used Dependency Injection. However, it is 
     17also one of the most difficult to explain well. This is probably partly 
    1818due to the nonsense examples used in most introductions to Dependency 
    19 Injection. In this chapter, we have tried to come up with examples that fits 
     19Injection. In this chapter, we have tried to come up with examples that fit 
    2020the PHP world better. As PHP is a language mainly used for web development, 
    2121we are going to use simple Web examples. 
     
    210210 
    211211>**TIP** 
    212 >As any other design pattern, Dependency Injection 
     212>As with any other design pattern, Dependency Injection 
    213213>also has some anti-patterns.  The 
    214214>[Pico Container website](http://www.picocontainer.org/) 
  • components/dependency_injection/trunk/doc/02-Dependency-Injection-Containers.markdown

    r19708 r19710  
    1212a framework for instance). 
    1313 
    14 If you remember the example of the first chapter, creating a `User` object 
    15 required to first create a `SessionStorage` object. Not a big deal, but still, 
     14If you remember the example in the first chapter, creating a `User` object 
     15required us to first create a `SessionStorage` object. Not a big deal, but still, 
    1616you have to know about all the dependencies you need before creating the 
    1717object you need: 
     
    2626Framework examples. 
    2727 
    28 The Zend Framework `Mail` library, which ease emails management, uses the PHP 
     28The Zend Framework `Mail` library, which eases email management, uses the PHP 
    2929`mail()` function by default to send emails, which is not really flexible. 
    3030Thankfully, it is quite easy to change this behavior by providing a transport 
     
    162162    $mailer = $container->getMailer(); 
    163163 
    164 Last, but not the least, each time you want to get a mailer, you don't need a 
     164Last, but not least, each time you want to get a mailer, you don't need a 
    165165new instance of it. So, the container can be changed to always return the same 
    166166object: 
  • components/dependency_injection/trunk/doc/03-Service-Container.markdown

    r19708 r19710  
    9090 
    9191That's not much, but it will give us a more powerful and clean interface. Here 
    92 is the main changes we made: 
     92are the main changes we made: 
    9393 
    9494 * The method names have been suffixed with `Service`. By convention, a 
     
    192192That's why, most of the time, you don't use the `sfServiceContainer` class 
    193193directly. It was nonetheless important to take some time to describe it as it 
    194 is the corner stone of the Symfony dependency injection container 
     194is the cornerstone of the Symfony dependency injection container 
    195195implementation.