|
| 1 | +## Features |
| 2 | + |
| 3 | +<div class="features"> |
| 4 | + <div class="row"> |
| 5 | + <div class="col-sm-6 col-md-4 text-center"> |
| 6 | + <img src="images/lambda.png" alt="Middleware"> |
| 7 | + |
| 8 | + <h3>PSR-15 Middleware</h3> |
| 9 | + |
| 10 | + <p> |
| 11 | + Create <a href="https://docs.zendframework.com/zend-stratigility/middleware/">middleware</a> |
| 12 | + applications, using as many layers as you want, and the architecture |
| 13 | + your project needs. |
| 14 | + </p> |
| 15 | + </div> |
| 16 | + |
| 17 | + <div class="col-sm-6 col-md-4 text-center"> |
| 18 | + <img src="images/check.png" alt="PSR-7"> |
| 19 | + |
| 20 | + <h3>PSR-7 HTTP Messages</h3> |
| 21 | + |
| 22 | + <p> |
| 23 | + Built to consume <a href="https://www.php-fig.org/psr/psr-7/">PSR-7</a>! |
| 24 | + </p> |
| 25 | + </div> |
| 26 | + |
| 27 | + <div class="col-sm-6 col-md-4 text-center"> |
| 28 | + <img src="images/network.png" alt="Routing"> |
| 29 | + |
| 30 | + <h3>Routing</h3> |
| 31 | + |
| 32 | + <p> |
| 33 | + Route requests to middleware using <a href="v3/features/router/intro/">the routing library of your choice</a>. |
| 34 | + </p> |
| 35 | + </div> |
| 36 | + </div> |
| 37 | + |
| 38 | + <div class="row"> |
| 39 | + <div class="col-sm-6 col-md-4 text-center"> |
| 40 | + <img src="images/syringe.png" alt="Dependency Injection"> |
| 41 | + |
| 42 | + <h3>Dependency Injection</h3> |
| 43 | + |
| 44 | + <p> |
| 45 | + Make your code flexible and robust, using the |
| 46 | + <a href="v3/features/container/intro/">dependency injection container of your choice</a>. |
| 47 | + </p> |
| 48 | + </div> |
| 49 | + |
| 50 | + <div class="col-sm-6 col-md-4 text-center"> |
| 51 | + <img src="images/pencil.png" alt="Templating"> |
| 52 | + |
| 53 | + <h3>Templating</h3> |
| 54 | + |
| 55 | + <p> |
| 56 | + Create <a href="v3/features/template/intro/">templated responses</a>, using |
| 57 | + a variety of template engines. |
| 58 | + </p> |
| 59 | + </div> |
| 60 | + |
| 61 | + <div class="col-sm-6 col-md-4 text-center"> |
| 62 | + <img src="images/error.png" alt="Error Handling"> |
| 63 | + |
| 64 | + <h3>Error Handling</h3> |
| 65 | + |
| 66 | + <p> |
| 67 | + <a href="v3/features/error-handling/">Handle errors gracefully</a>, using |
| 68 | + templated error pages, <a href="https://filp.github.io/whoops/">whoops</a>, |
| 69 | + or your own solution! |
| 70 | + </p> |
| 71 | + </div> |
| 72 | + </div> |
| 73 | +</div> |
| 74 | + |
| 75 | +## Get Started Now! |
| 76 | + |
| 77 | +Installation is only a [Composer](https://getcomposer.org) command away! |
| 78 | + |
| 79 | +```bash |
| 80 | +$ composer create-project zendframework/zend-expressive-skeleton expressive |
| 81 | +``` |
| 82 | + |
| 83 | +Expressive provides interfaces for routing and templating, letting _you_ |
| 84 | +choose what to use, and how you want to implement it. |
| 85 | + |
| 86 | +Our unique installer allows you to select <em>your</em> choices when starting |
| 87 | +your project! |
| 88 | + |
| 89 | + |
| 90 | +{: .center-block } |
| 91 | + |
| 92 | +[Learn More](v3/getting-started/quick-start.md){: .btn .btn-lg .btn-primary} |
| 93 | + |
| 94 | +## Applications, Simplified |
| 95 | + |
| 96 | +Write middleware: |
| 97 | + |
| 98 | +```php |
| 99 | +$pathMiddleware = function ( |
| 100 | + ServerRequestInterface $request, |
| 101 | + RequestHandlerInterface $handler |
| 102 | +) { |
| 103 | + $uri = $request->getUri(); |
| 104 | + $path = $uri->getPath(); |
| 105 | + |
| 106 | + return new TextResponse('You visited ' . $path, 200, ['X-Path' => $path]); |
| 107 | +}; |
| 108 | +``` |
| 109 | + |
| 110 | +And add it to an application: |
| 111 | + |
| 112 | +```php |
| 113 | +$app->get('/path', $pathMiddleware); |
| 114 | +``` |
| 115 | + |
| 116 | +[Learn More](v3/features/application.md){: .btn .btn-lg .btn-primary} |
| 117 | + |
| 118 | +## Learn more |
| 119 | + |
| 120 | +* [Features overview](v3/getting-started/features.md) |
| 121 | +* [Quick Start](v3/getting-started/quick-start.md) |
| 122 | + |
| 123 | +Or use the sidebar menu to navigate to the section you're interested in. |
0 commit comments