diff --git a/README.md b/README.md index 377afed..0cd5846 100644 --- a/README.md +++ b/README.md @@ -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); }); ``` diff --git a/flight/template/View.php b/flight/template/View.php index 152ce75..4b2f968 100644 --- a/flight/template/View.php +++ b/flight/template/View.php @@ -15,7 +15,7 @@ namespace flight\template; */ class View { /** - * Locaton of view templates. + * Location of view templates. * * @var string */ diff --git a/tests/LoaderTest.php b/tests/LoaderTest.php index 657dd80..65d61f5 100644 --- a/tests/LoaderTest.php +++ b/tests/LoaderTest.php @@ -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'; diff --git a/tests/RedirectTest.php b/tests/RedirectTest.php index d35b221..7f006d8 100644 --- a/tests/RedirectTest.php +++ b/tests/RedirectTest.php @@ -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; diff --git a/tests/RegisterTest.php b/tests/RegisterTest.php index 6d63fc3..9b05e5f 100644 --- a/tests/RegisterTest.php +++ b/tests/RegisterTest.php @@ -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';