Skip to content

Commit 10dc420

Browse files
committed
changed attribute order, so we don't have any breaking changes
1 parent ebfcc38 commit 10dc420

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

readme.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ $dp = new \Le\Dataplater\Dataplater(
5454

5555
// optional:
5656
vars: [ 'var' => 'value', ], // global vars
57-
attr: 'data-custom', // custom base attribute
58-
baseDir: 'app/templates/' // base directory for templates
57+
baseDir: 'app/templates/', // base directory for templates
58+
attr: 'data-custom' // custom base attribute
5959
);
6060
```
6161

@@ -64,8 +64,8 @@ The recommended way to initialize the object is by using PHP8's named arguments.
6464

6565
Optional parameters:
6666
- `vars`: an array of global vars to pass into the template with keys being the vars' names
67-
- `attr`: the base attribute name to use for all attributes (defaults to `data-dp`)
6867
- `baseDir`: the base directory to use for includes (defaults to `.`)
68+
- `attr`: the base attribute name to use for all attributes (defaults to `data-dp`)
6969

7070
### `render()` method
7171

src/Dataplater.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ public function __construct(
2424
?string $filename = null,
2525
?string $template = null,
2626
protected array $vars = [],
27-
protected string $attr = 'data-dp',
2827
protected string $baseDir = '.',
28+
protected string $attr = 'data-dp',
2929
) {
3030
if ($filename === null && $template === null) {
3131
throw new InvalidArgumentException('must provide either the filename or the template string param');

0 commit comments

Comments
 (0)