create-berna-stencil 1.0.20 → 1.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3,7 +3,7 @@
3
3
  'name' => '__root__',
4
4
  'pretty_version' => 'dev-main',
5
5
  'version' => 'dev-main',
6
- 'reference' => 'e4d3643e35a44fdeefbcfd5a5ca35bf44191fd6d',
6
+ 'reference' => 'bb9aa8d8f7ee79e3cd88ebf5d61bf137732aa4f1',
7
7
  'type' => 'library',
8
8
  'install_path' => __DIR__ . '/../../',
9
9
  'aliases' => array(),
@@ -13,7 +13,7 @@
13
13
  '__root__' => array(
14
14
  'pretty_version' => 'dev-main',
15
15
  'version' => 'dev-main',
16
- 'reference' => 'e4d3643e35a44fdeefbcfd5a5ca35bf44191fd6d',
16
+ 'reference' => 'bb9aa8d8f7ee79e3cd88ebf5d61bf137732aa4f1',
17
17
  'type' => 'library',
18
18
  'install_path' => __DIR__ . '/../../',
19
19
  'aliases' => array(),
@@ -0,0 +1,28 @@
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ if (!defined('CORE_ACCESS')) {
6
+ $errorPage = $_SERVER['DOCUMENT_ROOT'] . '/404.html';
7
+ http_response_code(404);
8
+ if (file_exists($errorPage)) {
9
+ header('Content-Type: text/html; charset=UTF-8');
10
+ echo file_get_contents($errorPage);
11
+ } else {
12
+ echo "404 Not Found";
13
+ }
14
+ exit;
15
+ }
16
+
17
+ require_once __DIR__ . '/../../core/modules/Response.php';
18
+
19
+ if ($method !== 'GET') {
20
+ Response::error('Method not allowed', 405);
21
+ }
22
+
23
+ Response::success([
24
+ 'message' => 'Protected endpoint is working',
25
+ 'endpoint' => 'example-protected-endpoint',
26
+ 'visibility' => 'protected',
27
+ 'params' => $requestParams,
28
+ ]);
@@ -0,0 +1,28 @@
1
+ <?php
2
+
3
+ declare(strict_types=1);
4
+
5
+ if (!defined('CORE_ACCESS')) {
6
+ $errorPage = $_SERVER['DOCUMENT_ROOT'] . '/404.html';
7
+ http_response_code(404);
8
+ if (file_exists($errorPage)) {
9
+ header('Content-Type: text/html; charset=UTF-8');
10
+ echo file_get_contents($errorPage);
11
+ } else {
12
+ echo "404 Not Found";
13
+ }
14
+ exit;
15
+ }
16
+
17
+ require_once __DIR__ . '/../../core/modules/Response.php';
18
+
19
+ if ($method !== 'GET') {
20
+ Response::error('Method not allowed', 405);
21
+ }
22
+
23
+ Response::success([
24
+ 'message' => 'Public endpoint is working',
25
+ 'endpoint' => 'example-public-endpoint',
26
+ 'visibility' => 'public',
27
+ 'params' => $requestParams,
28
+ ]);
@@ -1,16 +0,0 @@
1
- <?php
2
-
3
- declare(strict_types=1);
4
-
5
- require_once __DIR__ . '/../../core/modules/Response.php';
6
-
7
- if ($method !== 'GET') {
8
- Response::error('Method not allowed', 405);
9
- }
10
-
11
- Response::success([
12
- 'message' => 'Protected endpoint is working',
13
- 'endpoint' => 'prova-chiusa',
14
- 'visibility' => 'protected',
15
- 'params' => $requestParams,
16
- ]);
@@ -1,16 +0,0 @@
1
- <?php
2
-
3
- declare(strict_types=1);
4
-
5
- require_once __DIR__ . '/../../core/modules/Response.php';
6
-
7
- if ($method !== 'GET') {
8
- Response::error('Method not allowed', 405);
9
- }
10
-
11
- Response::success([
12
- 'message' => 'Public endpoint is working',
13
- 'endpoint' => 'prova-aperta',
14
- 'visibility' => 'public',
15
- 'params' => $requestParams,
16
- ]);