Skip to content

Commit c81f3b9

Browse files
authored
Fix readme and minor improvements for phpdoc (#198)
1 parent 12b99ef commit c81f3b9

10 files changed

Lines changed: 21 additions & 14 deletions

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,22 +40,28 @@ The package provides two use cases for managing view templates:
4040

4141
### State of `View` and `WebView` services
4242

43-
While being immutable and, by itself, stateless, both `View` and `WebView` services have sets of stateful and mutable data.
43+
While being immutable and, by itself, stateless, both `View` and `WebView` services have sets of stateful and mutable
44+
data.
4445

4546
`View` service:
4647
- parameters,
47-
- blocks.
48+
- blocks,
49+
- theme,
50+
- language.
4851

4952
`WebView` service:
5053
- parameters,
5154
- blocks,
55+
- theme,
56+
- language,
5257
- title,
5358
- meta and link tags,
5459
- JS/CSS strings,
5560
- JS/CSS files.
5661

5762
The state of `View` and `WebView` is not cloned when the services are cloned. So when
58-
using `with*()`, both new and old instances are sharing the same set of stateful mutable data. It allows, for example, to get `WebView` via type-hinting in a controller and change context path:
63+
using `with*()`, both new and old instances are sharing the same set of stateful mutable data. It allows, for example,
64+
to get `WebView` via type-hinting in a controller and change context path:
5965

6066
```php
6167
final class BlogController {

src/Cache/CachedContent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
use function strtr;
2020

2121
/**
22-
* CacheContent caches content, supports the use of dynamic content {@see DynamicContent} inside cached content.
22+
* `CacheContent` caches content, supports the use of dynamic content {@see DynamicContent} inside cached content.
2323
*/
2424
final class CachedContent
2525
{

src/Cache/DynamicContent.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Yiisoft\View\Cache;
66

77
/**
8-
* DynamicContent generates data for dynamic content that is used for cached content {@see CachedContent}.
8+
* `DynamicContent` generates data for dynamic content that is used for cached content {@see CachedContent}.
99
*/
1010
final class DynamicContent
1111
{

src/PhpTemplateRenderer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
use function ob_start;
1616

1717
/**
18-
* PhpTemplateRenderer renders the PHP views.
18+
* `PhpTemplateRenderer` renders the PHP views.
1919
*/
2020
final class PhpTemplateRenderer implements TemplateRendererInterface
2121
{

src/TemplateRendererInterface.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
namespace Yiisoft\View;
66

77
/**
8-
* TemplateRendererInterface is the interface that should be implemented by view template renderers.
8+
* `TemplateRendererInterface` is the interface that should be implemented by view template renderers.
99
*/
1010
interface TemplateRendererInterface
1111
{

src/Theme.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use function substr;
1717

1818
/**
19-
* Theme represents an application theme.
19+
* `Theme` represents an application theme.
2020
*
2121
* When {@see View} renders a view file, it will check the {@see View::$theme} to see if there is a themed
2222
* version of the view file exists. If so, the themed version will be rendered instead.

src/View.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
use function ob_start;
1919

2020
/**
21-
* View represents an instance of a view for use in an any environment.
21+
* `View` represents an instance of a view for use in an any environment.
2222
*
23-
* View provides a set of methods (e.g. {@see View::render()}) for rendering purpose.
23+
* `View` provides a set of methods (e.g. {@see View::render()}) for rendering purpose.
2424
*/
2525
final class View implements ViewInterface
2626
{

src/ViewContextInterface.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
namespace Yiisoft\View;
66

77
/**
8-
* ViewContextInterface is the interface that should be implemented by classes who want to support relative view names.
8+
* `ViewContextInterface` is the interface that should be implemented by classes who want to support relative view
9+
* names.
910
*
1011
* The method {@see ViewContextInterface::getViewPath()} should be implemented to return the view path
1112
* that may be prefixed to a relative view name.

src/ViewTrait.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
use function substr;
2727

2828
/**
29-
* ViewTrait could be used as a base implementation of {@see ViewInterface}.
29+
* `ViewTrait` could be used as a base implementation of {@see ViewInterface}.
3030
*
3131
* @internal
3232
*/

src/WebView.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@
3131
use function strtr;
3232

3333
/**
34-
* WebView represents an instance of a view for use in a WEB environment.
34+
* `WebView` represents an instance of a view for use in a WEB environment.
3535
*
36-
* WebView provides a set of methods (e.g. {@see WebView::render()}) for rendering purpose.
36+
* `WebView` provides a set of methods (e.g. {@see WebView::render()}) for rendering purpose.
3737
*/
3838
final class WebView implements ViewInterface
3939
{

0 commit comments

Comments
 (0)