diff --git a/README.md b/README.md index 0738115..f74ec10 100644 --- a/README.md +++ b/README.md @@ -146,7 +146,7 @@ To route all requests to a single callback, you can do: # Extending -Flight designed to be an extensible framework. The framework comes with a set of default methods and components, but it allows you to map your own methods, register your own classes, or even override existing classes and methods. +Flight is designed to be an extensible framework. The framework comes with a set of default methods and components, but it allows you to map your own methods, register your own classes, or even override existing classes and methods. ## Mapping Methods @@ -203,7 +203,7 @@ using the same name, only the mapped method will be invoked. # Overriding -Flight allows you to override its default functionality to suit your own needs without having to modify any code. +Flight allows you to override its default functionality to suit your own needs, without having to modify any code. For example, when Flight cannot match a URL to a route, it invokes the `notFound` method which sends a generic HTTP 404 response. You can override this behavior by using the `map` method: @@ -358,14 +358,14 @@ By default Flight will look for a `views` directory for template files. You can ## Layouts -It is common for websites to have a single layout template file with interchanging content. To render content for a layout you need to pass in a variable name to the `render` method. +It is common for websites to have a single layout template file with interchanging content. To render content to be used in a layout, you can pass in an optional parameter to the `render` method. Flight::render('header', array('heading' => 'Hello'), 'header_content'); Flight::render('body', array('message' => 'World'), 'body_content'); Your view will then have saved variables called `header_content` and `body_content`. You can then render your layout by doing: - Flight::render('layout', array('title' => 'Home')); + Flight::render('layout', array('title' => 'Home Page')); If the template files looks like this: @@ -393,7 +393,7 @@ The output would be:
-