Skip to content

Commit fd691bc

Browse files
author
ginger-tek
committed
update docs and dynamic param example
1 parent 35067af commit fd691bc

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ There are 4 global variables you can use in a layout or page file: `$config`, `$
122122
|Name|Data Type|Note|
123123
|---|---|---|
124124
|`$config`|`object`|The stdClass object of `config.json`|
125-
|`$req`|`object`|The current request, contains properties `path` (string of URI), `method` (string of HTTP method), `query` (associative array of URL query parameters), and `params` (asociative array of dynamic URI parameters)|
125+
|`$req`|`object`|The current request, contains properties `path` (string of URI), `method` (string of HTTP method), `query` (object of URL query parameters), and `params` (object of dynamic URI parameters)|
126126
|`$page`|`object`|Contains the `body` content property, as well as all the properties defined by the route object|
127127

128128
# Config.json
@@ -144,13 +144,11 @@ There are 4 global variables you can use in a layout or page file: `$config`, `$
144144
# Plugins
145145
Plugins can be made for Jerpy, but they do not follow any specific framework or design pattern. This is left up to the developer to ensure that the plugin works and tests succesfully with all the existing features of Jerpy.
146146

147-
The only requirements for plugins are the entrypoint to be included globally at runtime must be a `.php` file with the same name as the plugin's folder
148-
149-
Example plugin structure:
147+
The only requirements for plugins are that the entrypoint that is included globally at runtime must be a `.php` file with the same name as the plugin's folder:
150148
```
151149
πŸ—€ plugins
152-
πŸ—€ myPlugin
153-
πŸ—‹ myPlugin.php
150+
πŸ—€ myPlugin <-- plugin dir
151+
πŸ—‹ myPlugin.php <-- entrypoint (same as plugin dir)
154152
πŸ—€ vendor
155153
πŸ—‹ someSupportingFile.php
156154
```

β€Žpages/product.phpβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
<p>ID: <?= $req->params['id'] ?></p>
1+
<p>ID: <?= $req->params->id ?></p>

0 commit comments

Comments
Β (0)