Skip to content

Commit

Permalink
Docs Lint Review Fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cod43156 committed Nov 8, 2024
1 parent 5553656 commit 0c16553
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 20 deletions.
9 changes: 5 additions & 4 deletions docs/book/index.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
# Installation
<!-- markdownlint-disable-next-line heading-increment -->
## Installation

Check failure on line 2 in docs/book/index.md

View workflow job for this annotation

GitHub Actions / ci / QA Checks (Documentation Linting [8.1, locked], ubuntu-latest, laminas/laminas-continuous-integra...

First line in a file should be a top-level heading [Context: "## Installation"]

## Using Composer
### Using Composer

```bash
$ composer require laminas/laminas-cache
```

## Learn

```php
<!-- markdownlint-disable no-inline-html -->
<ul class="list-group list-group-flush">
<li class="list-group-item">
<a href="/laminas-cache/v3/application-integration/usage-in-a-laminas-mvc-application/">Usage in a laminas-mvc application</a>
</li>
</ul>
```
<!-- markdownlint-enable no-inline-html -->
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ final class IndexController extends AbstractActionController
To [register the controller](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-route) for the application, extend the configuration of the module.
Add the following lines to the module configuration file, e.g. `module/Application/config/module.config.php`:
```php
<!-- markdownlint-disable-next-line no-inline-html -->
<pre class="language-php" data-line="3,8"><code>
namespace Application;
Expand All @@ -94,7 +94,6 @@ return [
// …
];
</code></pre>
```
The example uses the [config factory from laminas-servicemanager](https://docs.laminas.dev/laminas-servicemanager/config-abstract-factory/) which allows any string to be used to fetch a service from the application service container, like the name of the configured cache: `default-cache`.
Expand All @@ -105,7 +104,7 @@ This means that the factory [searches for an appropriate configuration](https://
Extend the module configuration file to add the configuration for the controller.
Use the name of the cache (`default-cache`), which was previously defined in the configuration of the caches, to retrieve the related cache storage instance:
```php
<!-- markdownlint-disable-next-line no-inline-html -->
<pre class="language-php" data-line="11-15"><code>
namespace Application;
Expand All @@ -125,15 +124,14 @@ return [
// …
];
</code></pre>
```
## Using Multiple Caches
The use more than one cache backend, the factory `Laminas\Cache\Service\StorageCacheAbstractServiceFactory` allows to define multiple cache storages.
Extend the cache configuration in `config/autoload/cache.global.php` and add more cache adapters:
```php
<!-- markdownlint-disable-next-line no-inline-html -->
<pre class="language-php" data-line="9-14"><code>
return [
'caches' => [
Expand All @@ -152,7 +150,6 @@ return [
],
];
</code></pre>
```
MISSING: **Installation Requirements**
Make sure that the [used storage adapters are installed](#preparation):
Expand All @@ -165,7 +162,7 @@ $ composer require laminas/laminas-cache-storage-adapter-memory laminas/laminas-
To use a different cache adapter for the controller, change the related module configuration and use one of the previously defined names:
```php
<!-- markdownlint-disable-next-line no-inline-html -->
<pre class="language-php" data-line="13"><code>
namespace Application;
Expand All @@ -185,7 +182,6 @@ return [
// …
];
</code></pre>
```
## Learn More
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ final class IndexController extends AbstractActionController
To [register the controller](https://docs.laminas.dev/laminas-mvc/quick-start/#create-a-route) for the application, extend the configuration of the module.
Add the following lines to the module configuration file, e.g. `module/Application/config/module.config.php`:
```php
<!-- markdownlint-disable-next-line no-inline-html -->
<pre class="language-php" data-line="3,8"><code>
namespace Application;
Expand All @@ -90,7 +90,6 @@ return [
// …
];
</code></pre>
```
The example uses the [config factory from laminas-servicemanager](https://docs.laminas.dev/laminas-servicemanager/config-abstract-factory/) which allows any string to be used to fetch a service from the application service container, like the name of the configured cache: `default-cache`.
Expand All @@ -101,7 +100,7 @@ This means that the factory [searches for an appropriate configuration](https://
Extend the module configuration file to add the configuration for the controller.
Use the name of the cache (`default-cache`), which was previously defined in the configuration of the caches, to retrieve the related cache storage instance:
```php
<!-- markdownlint-disable-next-line no-inline-html -->
<pre class="language-php" data-line="11-15"><code>
namespace Application;
Expand All @@ -121,15 +120,14 @@ return [
// …
];
</code></pre>
```
## Using Multiple Caches
The use more than one cache backend, the factory `Laminas\Cache\Service\StorageCacheAbstractServiceFactory` allows to define multiple cache storages.
Extend the cache configuration in `config/autoload/cache.global.php` and add more cache adapters:
```php
<!-- markdownlint-disable-next-line no-inline-html -->
<pre class="language-php" data-line="9-14"><code>
return [
'caches' => [
Expand All @@ -148,7 +146,6 @@ return [
],
];
</code></pre>
```
MISSING: **Installation Requirements**
Make sure that the [used storage adapters are installed](#preparation):
Expand All @@ -161,7 +158,7 @@ $ composer require laminas/laminas-cache-storage-adapter-memory laminas/laminas-
To use a different cache adapter for the controller, change the related module configuration and use one of the previously defined names:
```php
<!-- markdownlint-disable-next-line no-inline-html -->
<pre class="language-php" data-line="13"><code>
namespace Application;
Expand All @@ -181,7 +178,6 @@ return [
// …
];
</code></pre>
```
## Learn More
Expand Down

0 comments on commit 0c16553

Please sign in to comment.