Browse Source

Code formatting

main
Cédric Belin 4 months ago
parent
commit
73b2a6ad91
4 changed files with 6 additions and 8 deletions
  1. +0
    -2
      .editorconfig
  2. +1
    -1
      doc/index.md
  3. +3
    -3
      doc/installation.md
  4. +2
    -2
      doc/usage.md

+ 0
- 2
.editorconfig View File

@@ -5,8 +5,6 @@ root = true
charset = utf-8
indent_style = tab
insert_final_newline = true
max_line_length = 200
quote_type = double
tab_width = 2
trim_trailing_whitespace = true



+ 1
- 1
doc/index.md View File

@@ -7,7 +7,7 @@ This renderer allows to use [Mustache syntax](https://mustache.github.io/mustach
## Quick start
Install the latest version of **Mustache for Yii** with [Composer](https://getcomposer.org):

```shell
``` shell
composer require cedx/yii2-mustache
```



+ 3
- 3
doc/installation.md View File

@@ -6,7 +6,7 @@ and [Composer](https://getcomposer.org), the PHP package manager, up and running

You can verify if you're already good to go with the following commands:

```shell
``` shell
php --version
# PHP 7.4.5 (cli) (built: Apr 14 2020 16:17:19) ( NTS Visual C++ 2017 x64 )

@@ -23,14 +23,14 @@ composer --version
### 1. Install it
From a command prompt, run:

```shell
``` shell
composer require cedx/yii2-mustache
```

### 2. Import it
Now in your [PHP](https://www.php.net) code, you can use:

```php
``` php
<?php
use yii\mustache\{ViewRenderer};
```

+ 2
- 2
doc/usage.md View File

@@ -3,7 +3,7 @@
## Configuring application
In order to start using [Mustache](https://mustache.github.io) you need to configure the `view` application component, like the following:

```php
``` php
<?php return [
"components" => [
"view" => [
@@ -18,7 +18,7 @@ In order to start using [Mustache](https://mustache.github.io) you need to confi

After it's done you can create templates in files that have the `.mustache` extension (or use another file extension but configure the component accordingly). Unlike standard view files, when using [Mustache](https://mustache.github.io) you must include the extension in your `$this->render()` controller call:

```php
``` php
<?php
use yii\web\{Controller, Response};



Loading…
Cancel
Save