diff --git a/05 Extending.md b/05 Extending.md index 01ad9df..5252acd 100644 --- a/05 Extending.md +++ b/05 Extending.md @@ -37,9 +37,10 @@ The register method also allows you to pass along parameters to your class const If you pass in an additional callback parameter, it will be executed immediately after class construction. This allows you to perform any set up procedures for your new object. The callback function takes one parameter, an instance of the new object. // The callback will be passed the object that was constructed - Flight::register('db', 'Database', array('localhost', 'mydb', 'user', 'pass'), function($db){ - $db->connect(); - }); + Flight::register('db', 'Database', array('localhost', 'mydb', 'user', 'pass'), + function($db){ + $db->connect(); + }); By default, every time you load your class you will get a shared instance. To get a new instance of a class, simply pass in `false` as a parameter: