Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 053e946

Browse files
Quickstart fixes
1 parent 39f8d3a commit 053e946

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

doc/book/quick-start.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ class Module
635635

636636
The above will register the `JsonStrategy` with the "render" event, such that it
637637
executes prior to the `PhpRendererStrategy`, and thus ensure that a JSON payload
638-
is created when the controller returns an `JsonModel`.
638+
is created when the controller returns a `JsonModel`.
639639

640640
You could also use the module configuration to add the strategies:
641641
```php
@@ -651,8 +651,9 @@ class Module implements \Zend\ModuleManager\Feature\ConfigProviderInterface
651651
public function getConfig()
652652
{
653653
return [
654-
// ...
654+
/* ... */
655655
'view_manager' => [
656+
/* ... */
656657
'strategies' => [
657658
'ViewJsonStrategy',
658659
],
@@ -726,7 +727,7 @@ class MyController extends \Zend\Mvc\Controller\AbstractActionController
726727
*/
727728
public function listAction()
728729
{
729-
$items = /* ... get items .. .*/;
730+
$items = /* ... get items ... */;
730731
$viewModel = new \Zend\View\Model\ViewModel();
731732
$viewModel->setVariable('items', $items);
732733
return $viewModel;
@@ -737,7 +738,7 @@ class MyController extends \Zend\Mvc\Controller\AbstractActionController
737738
*/
738739
public function listJsonAction()
739740
{
740-
$items = /* ... get items .. .*/;
741+
$items = /* ... get items ... */;
741742
$viewModel = new \Zend\View\Model\JsonModel();
742743
$viewModel->setVariable('items', $items);
743744
return $viewModel;
@@ -748,13 +749,13 @@ class MyController extends \Zend\Mvc\Controller\AbstractActionController
748749
*/
749750
public function listFeedAction()
750751
{
751-
$items = /* ... get items .. .*/;
752+
$items = /* ... get items ... */;
752753
$viewModel = new \Zend\View\Model\FeedModel();
753754
$viewModel->setVariable('items', $items);
754755
return $viewModel;
755756
}
756757
}
757758
```
758759

759-
Or you could switch the `ViewModel` dynamically based on the "Accept" HTTP Header:
760-
[Zend-Mvc: AcceptableViewModelSelector Plugin](http://zendframework.github.io/zend-mvc/plugins/#acceptableviewmodelselector-plugin).
760+
Or you could switch the `ViewModel` dynamically based on the "Accept" HTTP Header with the
761+
[Zend-Mvc-Plugin AcceptableViewModelSelector](http://zendframework.github.io/zend-mvc/plugins/#acceptableviewmodelselector-plugin).

0 commit comments

Comments
 (0)