Merge pull request #89 from pborreli/typos

Fixed typos
pull/92/head
Mike Cao 11 years ago
commit 24e069bafe

@ -239,12 +239,12 @@ The register method also allows you to pass along parameters to your class const
```php
// Register class with constructor parameters
Flight::register('db', 'PDO', array('mysql:host=localhost;dnbname=test','user','pass'));
Flight::register('db', 'PDO', array('mysql:host=localhost;dbname=test','user','pass'));
// Get an instance of your class
// This will create an object with the defined parameters
//
// new PDO('mysql:host=localhost;dnbname=test','user','pass');
// new PDO('mysql:host=localhost;dbname=test','user','pass');
//
$db = Flight::db();
```
@ -253,7 +253,7 @@ If you pass in an additional callback parameter, it will be executed immediately
```php
// The callback will be passed the object that was constructed
Flight::register('db', 'PDO', array('mysql:host=localhost;dnbname=test','user','pass'), function($db){
Flight::register('db', 'PDO', array('mysql:host=localhost;dbname=test','user','pass'), function($db){
$db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
});
```

@ -15,7 +15,7 @@ namespace flight\template;
*/
class View {
/**
* Locaton of view templates.
* Location of view templates.
*
* @var string
*/

@ -52,7 +52,7 @@ class LoaderTest extends PHPUnit_Framework_TestCase
$this->assertEquals('Bob', $user->name);
}
// Register a class with initialzation
// Register a class with initialization
function testRegisterWithInitialization(){
$this->loader->register('c', 'User', array('Bob'), function($user){
$user->name = 'Fred';

@ -46,7 +46,7 @@ class RedirectTest extends PHPUnit_Framework_TestCase
$this->assertEquals('/login', $this->getBaseUrl($base, $url));
}
// Relative URLs shuold include the base
// Relative URLs should include the base
function testRelativeUrl(){
$url = 'login';
$base = $this->app->request()->base;

@ -42,7 +42,7 @@ class RegisterTest extends PHPUnit_Framework_TestCase
$this->assertEquals('Bob', $user->name);
}
// Register a class with initialzation
// Register a class with initialization
function testRegisterWithInitialization(){
$this->app->register('reg3', 'User', array('Bob'), function($user){
$user->name = 'Fred';

Loading…
Cancel
Save