Seamlessly Interconnected Middleware for Enterprise-Level Solutions
+Seamlessly Interconnected Middleware for Enterprise-Level Solutions
The request lifecycle is the sequence of steps that happen from the moment a user makes an HTTP request until the server sends back a response.
diff --git a/src/Blog/templates/page/blog-resource/best-practice/svn-keywords-setup-in-php-ide-zend-studio.html.twig b/src/Blog/templates/page/blog-resource/best-practice/svn-keywords-setup-in-php-ide-zend-studio.html.twig index 8d33c0d3..0ad09cf2 100644 --- a/src/Blog/templates/page/blog-resource/best-practice/svn-keywords-setup-in-php-ide-zend-studio.html.twig +++ b/src/Blog/templates/page/blog-resource/best-practice/svn-keywords-setup-in-php-ide-zend-studio.html.twig @@ -62,7 +62,7 @@ cacheName: bugtraq:url Propriety: http://www.dotkernel.net/view.php?id=%BUGID%For above Proprieties , apply only to project folder, NOT recursive -
Final step( below instructions are good only for svn:keywords )
+Final step( below instructions are good only for svn:keywords )
Check the Apply property recursively to: diff --git a/src/Blog/templates/page/blog-resource/dotkernel-api/content-negotiation-in-dotkernel-rest-api.html.twig b/src/Blog/templates/page/blog-resource/dotkernel-api/content-negotiation-in-dotkernel-rest-api.html.twig index b084bb9d..06c42391 100644 --- a/src/Blog/templates/page/blog-resource/dotkernel-api/content-negotiation-in-dotkernel-rest-api.html.twig +++ b/src/Blog/templates/page/blog-resource/dotkernel-api/content-negotiation-in-dotkernel-rest-api.html.twig @@ -30,7 +30,7 @@Content negotiation is an important aspect of RESTful APIs to make it possible for diverse systems to work seamlessly together. It's based on enabling clients and servers to agree on the format and language of data they exchange.
@@ -75,7 +75,7 @@HTTP Request Headers
+HTTP Request Headers
The HTTP request headers Content-Type and Accept are used to determine the data format that will be sent in the request and the response. There are several types to choose from. Here are some examples:
If the Accept header is not present, the server gets to decide the format of the response.
Content Negotiation using URL Patterns
+Content Negotiation using URL Patterns
Below are a couple of ways to communicate a preferred data format.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-1-0-0-released.html.twig b/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-1-0-0-released.html.twig index 45d0194a..00e82b87 100644 --- a/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-1-0-0-released.html.twig +++ b/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-1-0-0-released.html.twig @@ -33,12 +33,12 @@-Dotkernel API has come a long way since this post was created. Check out the newest version of Dotkernel API to stay up to date with the latest functional and security features.
DotKernel API 1.0.0 was just released!
+DotKernel API 1.0.0 was just released!
-
What is DotKernel API?
+What is DotKernel API?
It is a Zend Expressive 3 application aiming to help developers quickly and efficiently develop an API.
-
How does it work?
+How does it work?
Under the hood it uses the following libraries:
- ezimuel/zend-expressive-api: - skeleton application on which this API is based on @@ -54,7 +54,7 @@
- swagger-api/swagger-ui: ^3.22 - for creating OpenAPI 3 documentation
-
What does it offer?
+What does it offer?
Out-of-the-box, DotKernel API provides the following features:
- Secure authentication via OAuth2 diff --git a/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-client-side-authorization.html.twig b/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-client-side-authorization.html.twig index ff4980c9..799b1b29 100644 --- a/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-client-side-authorization.html.twig +++ b/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-client-side-authorization.html.twig @@ -32,7 +32,7 @@
- no-auth: the resource can be accessed without the need of authentication/authorization
- authentication: the resource can be accessed only by authenticated users @@ -67,20 +67,20 @@ Under the key roles you can define role inheritance. In the ab Of course, this setup is just a model, you should not use it in live projects because guests will end up having the same rights as admins. Under the key permissions you can define which routes are accessible to a role. In the above example, a member has access to the routes named avatar, users and user. -
- Versioning is replaced by Deprecations, using evolution strategy
- Frontend developed in Angular. @@ -47,7 +47,7 @@
- Redoc lists the documentation in read-only mode, detailing example requests and responses. -
query_cachehydration_cache
-- API with Rate Limit - we've added a simple API with a single key authentification and a simple implementation of a rate limit (see /configs/application.ini - section params.api)
- Cache System - Built on the Zend_Cache backends, provides caching within DotKernel, but also in library, more details about this and how it works can be found here.
- Removed WURFL integration, DotKernel can detect wether you use a mobile device separately now, the WURFL Library can be added as a Plugin from now on
- Removed multiple SMTP Transporter, it can be added as a plugin @@ -62,7 +62,7 @@ We've added a new class, Dot_Request, which lets you have control over the reque
- Admin fail logins are no longer sent to the first admin, they are sent to all developers found in devEmails within settings table in the database
- Alert System - Alerts can be sent to all the developers to notify them if something goes wrong, for more information about alerts read this article.
- 0000289: seo.xml will cause error on same varname for two modules instead of overwriting
- 0000249: email sent twice diff --git a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-light-the-best-choice-for-your-presentation-site.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-light-the-best-choice-for-your-presentation-site.html.twig index 70efedff..f0585c2b 100644 --- a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-light-the-best-choice-for-your-presentation-site.html.twig +++ b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-light-the-best-choice-for-your-presentation-site.html.twig @@ -30,7 +30,7 @@
- option_frontend_Page
- option_admin_seo (yes, seo is lowercase) -
- Zend_Config - While Zend Framework itself is configuration-less, it's often necessary to have some way to specify configurable options. Zend_Config provides multiple backends for configuration storage, and a simple, intuitive, object-oriented interface for accessing it. We store configuration as simple PHP arrays, which are then wrapped by Zend_Config.
- Zend_Db and Zend_Db_Table - Zend_Db_Table is a classic implementation of both the Table Data Gateway and Row Data Gateway design patterns, allowing for easy and intuitive access to database tables and rows, as well as an entry point for custom business logic surrounding our data. diff --git a/src/Blog/templates/page/blog-resource/dotkernel/logging-with-dot-log-in-zend-expressive-and-dotkernel.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/logging-with-dot-log-in-zend-expressive-and-dotkernel.html.twig index cd9de2c0..ffa49eb3 100644 --- a/src/Blog/templates/page/blog-resource/dotkernel/logging-with-dot-log-in-zend-expressive-and-dotkernel.html.twig +++ b/src/Blog/templates/page/blog-resource/dotkernel/logging-with-dot-log-in-zend-expressive-and-dotkernel.html.twig @@ -249,7 +249,7 @@ $logger->notice('5 NOTICE'); $logger->info('6 INF'); $logger->debug('7 debug'); $logger->log(Logger::NOTICE, 'NOTICE from log()'); -
- https://zendframework.github.io/zend-log/
- https://zendframework.github.io/zend-log/writers/ diff --git a/src/Blog/templates/page/blog-resource/dotkernel/migration-of-zend-framework-1-pear-channel.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/migration-of-zend-framework-1-pear-channel.html.twig index 5fddd0b6..75238fc8 100644 --- a/src/Blog/templates/page/blog-resource/dotkernel/migration-of-zend-framework-1-pear-channel.html.twig +++ b/src/Blog/templates/page/blog-resource/dotkernel/migration-of-zend-framework-1-pear-channel.html.twig @@ -37,7 +37,7 @@ Zend Framework 1 is still used by a lot of projects in Production, it's st We were unable to migrate the project on github.com since the size of the repository is more then 1 GB. We resorted to building a special server that will host only the PEAR channel for Zend Framework 1 and we are commited to keep it live and running for the long term. Instructions on how to use the new channel can be found below . -
- Zend_Loader changes @@ -65,12 +65,12 @@ Zend_Mobile_Push was contributed by Mike Willbanks.
- Zend_Http_UserAgent_Features_Adapter_WurflApi ( announced few months ago here )
- -a - the name of the action that will be executed @@ -44,7 +44,7 @@ Currently there are two command line arguments: Any other arguments set when calling the script will be available in the controller in the $registry->arguments array. The controller bundled with DotKernel has two example actions, "count-users" which demonstrates how to interact with models, and "send-newsletter" which reads the newsletter from the command line. -
- Runs on Zend Stratigility / Zend Expressive 3.0
- Middleware is now PSR-15 compliant
- PHP >=7.1 Support
- No functional changes were made in the core code
- If your middleware code is based on the dotkernel/dot-controller package no middleware migration is needed
- If your middleware code is based on the http-interop/http-middleware migration must be made to implement interfaces in psr/http-server-middleware
- dotkernel/dot-authentication-service:^1.0
- dotkernel/dot-authentication-web:^1.0.1 @@ -83,7 +81,7 @@ If your project is a DotKernel 3 instance (based on expressive 2), you can migra
- dotkernel/dot-twigrenderer:^1.1
- dotkernel/dot-user:^1.0
- psr/http-server-middleware:^1.0
- psr/http-server-handler:^1.0 @@ -98,7 +96,7 @@ If your project is a DotKernel 3 instance (based on expressive 2), you can migra
- zendframework/zend-component-installer:^2.0
- http-interop/http-middleware
- webimpress/http-middleware-compatibility diff --git a/src/Blog/templates/page/blog-resource/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys.html.twig b/src/Blog/templates/page/blog-resource/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys.html.twig index 8973a3c2..0672cd61 100644 --- a/src/Blog/templates/page/blog-resource/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys.html.twig +++ b/src/Blog/templates/page/blog-resource/headless-platform/dotkernel-headless-platform-the-whats-hows-and-whys.html.twig @@ -124,7 +124,7 @@
- Dotkernel API diff --git a/src/Blog/templates/page/blog-resource/headless-platform/implementing-time-based-one-time-password-totp-in-dotkernel.html.twig b/src/Blog/templates/page/blog-resource/headless-platform/implementing-time-based-one-time-password-totp-in-dotkernel.html.twig index f48bcdf6..e76f07c7 100644 --- a/src/Blog/templates/page/blog-resource/headless-platform/implementing-time-based-one-time-password-totp-in-dotkernel.html.twig +++ b/src/Blog/templates/page/blog-resource/headless-platform/implementing-time-based-one-time-password-totp-in-dotkernel.html.twig @@ -150,7 +150,7 @@
- dot-totp in GitHub diff --git a/src/Blog/templates/page/blog-resource/how-to/cors-policy-setup-in-dotkernel-using-mezzio-cors.html.twig b/src/Blog/templates/page/blog-resource/how-to/cors-policy-setup-in-dotkernel-using-mezzio-cors.html.twig index 09a17c60..fbdd1276 100644 --- a/src/Blog/templates/page/blog-resource/how-to/cors-policy-setup-in-dotkernel-using-mezzio-cors.html.twig +++ b/src/Blog/templates/page/blog-resource/how-to/cors-policy-setup-in-dotkernel-using-mezzio-cors.html.twig @@ -46,13 +46,13 @@
- Existing projects should start by creating a new migration, and mirror the current database design in that file.
@@ -77,7 +77,7 @@ Migrations are very easily adapted to any project.
Notice; Migrations are stored in version control, so whenever you pull an update, quickly run php dot migrate, as it will only ever migrate new files, and leave out the ones that have been run already.
-
Seeders
+Seeders
If you need to add some data to a table, e.g. adding a default admin profile on a fresh installation, this can be done via Seeders. Migrations manage the database layouts, seeders add data to the database. @@ -102,7 +102,7 @@ Seeders are created the same way as migrations, and also benefits hugely from be - Shareability and Trustworthiness -
- enter request name by replacing New Request with a short and descriptive name
- enter request description (first button under the Environment quick look button)
- enter request URL - you should use the already existing variable
APPLICATION_URLby wrapping it in double curly braces, then append the request path. Example:{{ APPLICATION_URL }}/testbecomeshttp://localhost:8080/testwhen you send the request. - select request method
- (optionally) inspect tabs:
- Params: manage query parameters
- Authorization: select authorization type
- Headers: manage request headers
- Body: manage request body
- Pre-request script: provide JavaScript that Postman should run before sending the request
- Tests: provide JavaScript that Postman should run after receiving the response
- Settings: manage miscellaneous request settings
- save the request using the Save button (or
Ctrl + S) - The portable option allows to use editor without the preliminary installation.
- Other useful utilities: pair highlighting, possibility of blocks selection, collapsing, tooltips, navigation on descriptions of functions and included files at withholding of the key of CTRL, viewing of structure of files and project, preview in a browser, book-marks, and all other standard possibilities for work with a code. -
- CMS: Drupal, Joomla
- PHP frameworks: CakePHP, CodeIgniter, Symfony, Yii diff --git a/src/Blog/templates/page/blog-resource/licensing/mit-versus-lgpl-in-practice-dotkernel-case.html.twig b/src/Blog/templates/page/blog-resource/licensing/mit-versus-lgpl-in-practice-dotkernel-case.html.twig index 3b4c505d..a1ea217c 100644 --- a/src/Blog/templates/page/blog-resource/licensing/mit-versus-lgpl-in-practice-dotkernel-case.html.twig +++ b/src/Blog/templates/page/blog-resource/licensing/mit-versus-lgpl-in-practice-dotkernel-case.html.twig @@ -32,21 +32,21 @@
- right click on the project @@ -68,7 +68,7 @@ As we created a local project named zend-framework-test we will
- copy the Zend folder in your project's library folder
- if the Drag and Drop didn't work and you had to manually copy the folder in your project you can click the project folder in Zend Studio and just press F5 (Refresh)
- right-click the project, not a folder or a file because the feature won't show up diff --git a/src/Blog/templates/page/blog-resource/php-troubleshooting/fix-installing-pear-packages-with-php-7-2.html.twig b/src/Blog/templates/page/blog-resource/php-troubleshooting/fix-installing-pear-packages-with-php-7-2.html.twig index 30992e4a..1c41b0c0 100644 --- a/src/Blog/templates/page/blog-resource/php-troubleshooting/fix-installing-pear-packages-with-php-7-2.html.twig +++ b/src/Blog/templates/page/blog-resource/php-troubleshooting/fix-installing-pear-packages-with-php-7-2.html.twig @@ -31,7 +31,7 @@
- Make sure the php_intl.so file exists within your php extensions directory, find the extensions directory by:
-
@@ -92,7 +92,7 @@ If you have the bundled PHP version, the extension might be existing but not ena
For projects hosted on a shared hosting platform you must ask your hosting provider to install/enable the PHP Intl extension.
-
- Make sure the php_intl.dll file exists within your php extensions directory
-
diff --git a/src/Blog/templates/page/blog.html.twig b/src/Blog/templates/page/blog.html.twig
index 7abe7bed..3e233650 100644
--- a/src/Blog/templates/page/blog.html.twig
+++ b/src/Blog/templates/page/blog.html.twig
@@ -29,7 +29,7 @@
{{ article.category.name }} - {{ article.title }}
+{{ article.title }}
{{ article.excerpt|length > 200 ? article.excerpt|slice(0, 200)|trim ~ '…' : article.excerpt }}
Read more → diff --git a/src/Blog/templates/page/categories.html.twig b/src/Blog/templates/page/categories.html.twig index 41e22b32..1b0a174c 100644 --- a/src/Blog/templates/page/categories.html.twig +++ b/src/Blog/templates/page/categories.html.twig @@ -26,7 +26,7 @@ style="width:20px;height:20px;color:var(--teal);" aria-hidden="true">- {{ category.name }}
+{{ category.name }}
Discover latest articles in this section.
Browse articles → diff --git a/src/Blog/templates/page/category-resource.html.twig b/src/Blog/templates/page/category-resource.html.twig index cc17acea..c1c074a9 100644 --- a/src/Blog/templates/page/category-resource.html.twig +++ b/src/Blog/templates/page/category-resource.html.twig @@ -33,7 +33,7 @@{{ article.category.name }} - {{ article.title }}
+{{ article.title }}
{{ article.excerpt|length > 200 ? article.excerpt|slice(0, 200)|trim ~ '…' : article.excerpt }}
Read more → diff --git a/src/Blog/templates/page/contact.html.twig b/src/Blog/templates/page/contact.html.twig index 39736d34..f729f57d 100644 --- a/src/Blog/templates/page/contact.html.twig +++ b/src/Blog/templates/page/contact.html.twig @@ -79,7 +79,7 @@ style="width:20px;height:20px;color:var(--teal);" aria-hidden="true">- GitHub
+GitHub
Browse our repositories, open issues, or contribute to the DotKernel ecosystem.
Visit GitHub → @@ -89,7 +89,7 @@- Documentation
+Documentation
Read the guides, references, and best practices for building with DotKernel.
Read the Docs → @@ -98,7 +98,7 @@ style="width:20px;height:20px;color:var(--teal);" aria-hidden="true">- Discussion
+Discussion
Ask questions, share ideas, and join the conversation with the DotKernel community.
Open Discussions → diff --git a/src/Blog/templates/page/dotkernel-packages-oss-lifecycle.html.twig b/src/Blog/templates/page/dotkernel-packages-oss-lifecycle.html.twig index 05574a92..2f6e1345 100644 --- a/src/Blog/templates/page/dotkernel-packages-oss-lifecycle.html.twig +++ b/src/Blog/templates/page/dotkernel-packages-oss-lifecycle.html.twig @@ -23,7 +23,7 @@-Active+light
Activelight
@@ -35,7 +35,7 @@
-Active+admin
Activeadmin
@@ -47,7 +47,7 @@
-Active+queue
Activequeue
@@ -59,7 +59,7 @@
-Active+api
Activeapi
@@ -71,7 +71,7 @@
-Active+dot-sso-entra
Activedot-sso-entra
@@ -83,7 +83,7 @@
-Active+frontend
Activefrontend
@@ -95,7 +95,7 @@
-Active+dot-cli
Activedot-cli
@@ -107,7 +107,7 @@
-Active+dot-event
Activedot-event
@@ -119,7 +119,7 @@
-Active+dot-mail
Activedot-mail
@@ -131,7 +131,7 @@
-Active+dot-twigrenderer
Activedot-twigrenderer
@@ -143,7 +143,7 @@
-Active+dot-totp
Activedot-totp
@@ -155,7 +155,7 @@
-Active+dot-authorization
Activedot-authorization
@@ -167,7 +167,7 @@
-Active+dot-maker
Activedot-maker
@@ -179,7 +179,7 @@
-Active+dot-geoip
Activedot-geoip
@@ -191,7 +191,7 @@
-Security-only+dot-annotated-services
Security-onlydot-annotated-services
@@ -203,7 +203,7 @@
-Active+dot-navigation
Activedot-navigation
@@ -215,7 +215,7 @@
-Active+dot-flashmessenger
Activedot-flashmessenger
@@ -227,7 +227,7 @@
-Active+dot-session
Activedot-session
@@ -239,7 +239,7 @@
-Active+dot-log
Activedot-log
@@ -251,7 +251,7 @@
-Active+dot-errorhandler
Activedot-errorhandler
@@ -263,7 +263,7 @@
-Active+dot-form
Activedot-form
@@ -275,7 +275,7 @@
-Active+dot-rbac-guard
Activedot-rbac-guard
@@ -287,7 +287,7 @@
-Active+dot-mail-outlook
Activedot-mail-outlook
@@ -299,7 +299,7 @@
-Active+dot-rbac-route-guard
Activedot-rbac-route-guard
@@ -311,7 +311,7 @@
-Active+dot-controller
Activedot-controller
@@ -323,7 +323,7 @@
-Active+dot-rbac
Activedot-rbac
@@ -335,7 +335,7 @@
-Active+dot-authentication
Activedot-authentication
@@ -347,7 +347,7 @@
-Active+dot-user-agent-sniffer
Activedot-user-agent-sniffer
@@ -359,7 +359,7 @@
-Active+dot-auth-social
Activedot-auth-social
@@ -371,7 +371,7 @@
-Active+dot-helpers
Activedot-helpers
@@ -383,7 +383,7 @@
-Active+dot-router
Activedot-router
@@ -395,7 +395,7 @@
-Active+dot-response-header
Activedot-response-header
@@ -407,7 +407,7 @@
-Active+dot-dependency-injection
Activedot-dependency-injection
@@ -419,7 +419,7 @@
-Active+dot-cache
Activedot-cache
@@ -431,7 +431,7 @@
-Active+dot-data-fixtures
Activedot-data-fixtures
@@ -443,7 +443,7 @@
-Active+dot-debugbar
Activedot-debugbar
@@ -455,7 +455,7 @@
-Security-only+dot-doctrine-metadata
Security-onlydot-doctrine-metadata
@@ -467,7 +467,7 @@
-Security-only+dot-mapper
Security-onlydot-mapper
@@ -479,7 +479,7 @@
-Security-only+dot-paginator
Security-onlydot-paginator
@@ -491,7 +491,7 @@
-Security-only+dot-validator
Security-onlydot-validator
@@ -503,7 +503,7 @@
-Security-only+dot-inputfilter
Security-onlydot-inputfilter
@@ -515,7 +515,7 @@
-Maintenance+dot-authentication-service
Maintenancedot-authentication-service
@@ -527,7 +527,7 @@
-Security-only+dot-hydrator
Security-onlydot-hydrator
@@ -539,7 +539,7 @@
-Security-only+dot-authentication-web
Security-onlydot-authentication-web
@@ -551,7 +551,7 @@
-Security-only+dot-controller-plugin-mail
Security-onlydot-controller-plugin-mail
@@ -563,7 +563,7 @@
-Security-only+dot-controller-plugin-session
Security-onlydot-controller-plugin-session
@@ -575,7 +575,7 @@
-Security-only+dot-user
Security-onlydot-user
@@ -587,7 +587,7 @@
-Security-only+dot-controller-plugin-flashmessenger
Security-onlydot-controller-plugin-flashmessenger
@@ -599,7 +599,7 @@
-Security-only+dot-filter
Security-onlydot-filter
@@ -611,7 +611,7 @@
-Security-only+dot-controller-plugin-forms
Security-onlydot-controller-plugin-forms
@@ -623,7 +623,7 @@
-Security-only+dot-controller-plugin-authorization
Security-onlydot-controller-plugin-authorization
@@ -635,7 +635,7 @@
-Security-only+dot-controller-plugin-authentication
Security-onlydot-controller-plugin-authentication
@@ -647,7 +647,7 @@
-Archived+dot-console
Archiveddot-console
For Windows-based Server:
+For Windows-based Server:
- Make sure the php_intl.dll file exists within your php extensions directory
Authorization Request
+Authorization Request
Client application users send a POST request to the backend containing the following JSON object:
{
@@ -45,7 +45,7 @@ Client application users send a POST request to the backend con
}
-Authorization Response
+Authorization Response
If the credentials are correct, the API will return a JSON object containing the authentication data:
{
diff --git a/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-server-side-authorization.html.twig b/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-server-side-authorization.html.twig
index 96657188..8044adaf 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-server-side-authorization.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-server-side-authorization.html.twig
@@ -31,7 +31,7 @@
This article covers the basic authorization of a Server Side application built using DotKernel API
-Protecting an endpoint
+Protecting an endpoint
1. No-auth endpoints:
+1. No-auth endpoints:
These endpoints can be accessed without authentication/authorization. Examples could be: login, register, contact etc...
Creating a route for such an endpoint will use only the handler(s) responsible for returning the content:
$app->get('/users', UserHandler::class, 'users');
-2. Endpoints requiring Authentication:
+2. Endpoints requiring Authentication:
These endpoints can be accessed only if a valid Bearer token is present in the request headers. Else, the API will return a **401 Unauthorized** response. Creating a route for such an endpoint will have a structure similar to the following example:
$app->get('/users', , 'users');
-3. Endpoints requiring Authorization:
+3. Endpoints requiring Authorization:
These endpoints can be accessed only if a valid Bearer token is present in the request headers. Else, the API will return a **403 Forbidden** response. Creating a route for such an endpoint will have a structure similar to the following example:
diff --git a/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-versus-laminas-api-tools.html.twig b/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-versus-laminas-api-tools.html.twig
index 14970f0c..81d12719 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-versus-laminas-api-tools.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel-api/dotkernel-api-versus-laminas-api-tools.html.twig
@@ -35,9 +35,9 @@
The table below refers to Dotkernel API V7
-API Tools (formerly Apigility) Dotkernel API URL api-tools Dotkernel API First Release 2012 2018 PHP Version <= 8.2 
Architecture MVC, Event Driven Middleware OSS Lifecycle Archived 
Style REST, RPC REST Versioning Yes Deprecations (API Evolution) * Documentation Swagger (Automated) Postman (Manual), OpenAPI 3.0 (Swagger) Content-Negotiation Custom Custom License BSD-3 MIT Default DB Layer laminas-db doctrine-orm 3.x Authorization ACL RBAC-guard Authentication HTTP Basic/Digest OAuth2.0 OAuth2.0 CI/CD Yes Yes Unit Tests Yes Yes Code (Endpoint) Generator Yes dot-maker PSR PSR-7 PSR-7, PSR-15
+API Tools (formerly Apigility) Dotkernel API URL api-tools Dotkernel API First Release 2012 2018 PHP Version <= 8.2 
Architecture MVC, Event Driven Middleware OSS Lifecycle Archived 
Style REST, RPC REST Versioning Yes Deprecations (API Evolution) * Documentation Swagger (Automated) Postman (Manual), OpenAPI 3.0 (Swagger) Content-Negotiation Custom Custom License BSD-3 MIT Default DB Layer laminas-db doctrine-orm 3.x Authorization ACL RBAC-guard Authentication HTTP Basic/Digest OAuth2.0 OAuth2.0 CI/CD Yes Yes Unit Tests Yes Yes Code (Endpoint) Generator Yes dot-maker PSR PSR-7 PSR-7, PSR-15
-Note
+Note
diff --git a/src/Blog/templates/page/blog-resource/dotkernel-api/error-reporting-endpoint-in-dotkernel-api.html.twig b/src/Blog/templates/page/blog-resource/dotkernel-api/error-reporting-endpoint-in-dotkernel-api.html.twig
index c366a864..ccae9728 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel-api/error-reporting-endpoint-in-dotkernel-api.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel-api/error-reporting-endpoint-in-dotkernel-api.html.twig
@@ -30,13 +30,13 @@
-
+
Dotkernel API has received a lot of love from our developers, with regular updates to the platform for years. We use Dotkernel API in our projects, so any bugs and issues are addressed as soon as they are found. Still, it's not unlikely that some hidden issues remain in fringe use cases that we simply haven't explored. The occurrence of bugs increases when the API is used in a complex frontend project.
Fatal errors are easily found in the API logs, but it's another matter altogether to deal with incorrect data processing that doesn't generate errors in the frontend that interfaces with the API. The error reporting endpoint was designed to allow the frontend developers of your API to report any bugs they encounter in a secure way that is fully under your control.
-Example case usage
+Example case usage
Error reporting is done by sending a POST request to the /error-report endpoint, together with a token in the header. In the sections below we will detail how to configure error reporting in your API and how the endpoint is used by the frontend developers.
-Generating a token and adding it to your API config
+Generating a token and adding it to your API config
First you need to generate a token for your request. This is done by using the below command.
@@ -62,7 +62,7 @@
]
]
-Validation mechanism
+Validation mechanism
Behind the scenes, the API validates your configuration and lets you know if any config items prevent the submission of the error report. Below are the requirements for an application to be able to send error messages to Dotkernel API.
@@ -97,7 +97,7 @@
If your request passes all the checks, the message is saved in the log file specified in ErrorReportServiceInterface::class . path.
-Tips and tricks
+Tips and tricks
If there are multiple applications that report errors to your API, you can assign a different error reporting token for each. The tokens support key-value pairs where:
diff --git a/src/Blog/templates/page/blog-resource/dotkernel-api/how-to-implement-mailchimp-in-dotkernel-api.html.twig b/src/Blog/templates/page/blog-resource/dotkernel-api/how-to-implement-mailchimp-in-dotkernel-api.html.twig
index 4056bbc7..513d51ee 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel-api/how-to-implement-mailchimp-in-dotkernel-api.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel-api/how-to-implement-mailchimp-in-dotkernel-api.html.twig
@@ -30,7 +30,7 @@
-This article will walk you through the process of implementing MailChimp into your instance of DotKernel API using drewm/mailchimp-api
+This article will walk you through the process of implementing MailChimp into your instance of DotKernel API using drewm/mailchimp-api
Step 1: Add the library to your application using the following command:
diff --git a/src/Blog/templates/page/blog-resource/dotkernel-api/openapi-implementation-in-dotkernel-api.html.twig b/src/Blog/templates/page/blog-resource/dotkernel-api/openapi-implementation-in-dotkernel-api.html.twig
index 2d7ea548..26925671 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel-api/openapi-implementation-in-dotkernel-api.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel-api/openapi-implementation-in-dotkernel-api.html.twig
@@ -77,7 +77,7 @@
Each module (Admin, App, User) in DotKernel API contains a file named OpenAPI.php. In this file you must document all of the endpoints from RoutesDelegator.php. The entries in OpenAPI.php have several descriptive items, the most important being method, request and response. These are used to generate a documentation file from the command line. The static documentation file is rendered using Swagger UI or Redoc in a user-friendly way. You can read more about this starting here and its subsequent pages.
-Describing OpenAPI components
+Describing OpenAPI components
All OpenAPI components require a handful of components that are universally valid for a given project. These are below:
@@ -113,11 +113,11 @@
Wherever it's appropriate, schemas should be used to ensure consistency. The optional 'tags' item can be used to group operations together. Read more here.
-Generating the documentation
+Generating the documentation
The documentation is generated using zircote/swagger-php. It uses the descriptions you added in the OpenAPI.php files to build the documentation file. The documentation contents can be listed in the command line or saved to a file in yaml of json format. You can read more here.
-Alternatives for rendering the documentation
+Alternatives for rendering the documentation
Once you have the documentation generated, it can be rendered in two ways:
@@ -126,7 +126,7 @@
Handling authentication for Swagger UI
+Handling authentication for Swagger UI
Most endpoints for your API should be protected, so to access them you are required to generate an authentication token (AuthToken). The token is related to the user type, so make sure to check the privileges required for the endpoint you are testing. After you submit the token, you can test the endpoints as an authenticated user. Clicking on the 'Try it out' button will activate the required parameter input fields and the textarea for the request body. The 'Execute' button will send the request and return the response. along with its HTTP status code. You can read more details here.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/adding-a-cors-implementation-to-zend-expressive.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/adding-a-cors-implementation-to-zend-expressive.html.twig
index 040ce808..7c63b86e 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/adding-a-cors-implementation-to-zend-expressive.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/adding-a-cors-implementation-to-zend-expressive.html.twig
@@ -32,7 +32,7 @@
This article is a guide on how to add a CORS implementation on an existing DotKernel3 project.
- The issue
+ The issue
If you're facing this message:
"Access to XMLHttpRequest at 'url' has been blocked by cors policy. No 'Access-Control-Allow-Origin header is present on the requested resource."
It means the server didn't sent the header that lets you access its data through a local client (eg.: browser).
@@ -47,13 +47,13 @@
A simple implementation would be using Tuupola's Cors Middleware package.
This article was inspired by: akrabat.com/implementing-tuupola-cors-in-expressive
- Adding the package to your project
+ Adding the package to your project
Run the following command in your project:
composer require tuupola/cors-middleware
At the time writing this article the current package version is: 0.9.4.
Follow the next steps to get your Zend Expressive or DotKernel3 project CORS friendly.
- Create the CORS config file
+ Create the CORS config file
Create a cors.global.php file in the config/autoload directory.
return [
'cors' => [
@@ -68,7 +68,7 @@
];
We'll come back at this file to register the CORS middleware.
- Creating a factory for the middleware
+ Creating a factory for the middleware
The factory should look like the one below.
The code below extracts de config from the cors key if provided or initializes an empty array and instantiates the Tuupola CORS middleware.
<?php
@@ -86,7 +86,7 @@ class CorsMiddlewareFactory
}
}
- Registering the CORS middleware
+ Registering the CORS middleware
Back at cors.global.php we will register the cors middleware so our custom implemented factory will be used to create the middleware. (basic config example below)
<?php
@@ -109,7 +109,7 @@ return [
]
];
- Final step: Adding (registering) the CorsMiddleware in the pipeline
+ Final step: Adding (registering) the CorsMiddleware in the pipeline
In this last step we only need to add the CorsMiddleware in config/pipelines.php
// don't forget the use statement
use Tuupola\Middleware\CorsMiddleware;
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/adding-composer-support-in-your-dotkernel-project.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/adding-composer-support-in-your-dotkernel-project.html.twig
index 73eacc78..70df6234 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/adding-composer-support-in-your-dotkernel-project.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/adding-composer-support-in-your-dotkernel-project.html.twig
@@ -37,7 +37,7 @@ This article will cover the needed steps to add composer support to your DotKern
Assuming that you know how to use composer (if not you should consider reading this article) we wil move on to your DotKernel project "composification".
-First things first
+First things first
The DotKernel project must have a composer.json file so that composer can work.
Our composer.json file should look like this:
@@ -73,7 +73,7 @@ If the vendor folder does not exist composer will create a vendor folde
Composer will create an autoload file, which will be use to load our dependencies/packages.
-Adding Composer Support to DotKernel
+Adding Composer Support to DotKernel
The autoload file created by composer will be used to load our packages.
>$composerAutoLoaderPath = realpath(APPLICATION_PATH.'/vendor/autoload.php');
require_once($composerAutoLoaderPath);
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/caching-in-dotkernel-using-zend-framework.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/caching-in-dotkernel-using-zend-framework.html.twig
index fdb70bfd..722153a8 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/caching-in-dotkernel-using-zend-framework.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/caching-in-dotkernel-using-zend-framework.html.twig
@@ -40,11 +40,11 @@ Because of that , we implemented in upcoming 1.8 version of DotKernel a cache la
We are implementing 2 different cache factories to choose from: apc (or apcu for newest PHP installations) and file.
-1. Configuring the cache
+1. Configuring the cache
The configuration can be set from /configs/application.ini, you can choose if you use the caching system, how long your cache stays valid, the cache namespace, and the storage provider (File or APC). I would disable the cache in development mode if I were you.
For more info about the configuration and help configuring the cache see: Configuring the Cache in DotKernel.
-2. Using the Cache
+2. Using the Cache
The cache is automatically loaded in the initialization and stored in the Registry.
Loading the caching engine is not needed because it is already loaded on kernel initialization (see Dot_Kernel::initialize($startTime)), but if you would like to use caching for other purposes (where you are not initializing the kernel), the loading syntax is the following:
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/dependency-injection-made-easy-in-laminas-mezzio-applications.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/dependency-injection-made-easy-in-laminas-mezzio-applications.html.twig
index e2fbfbea..c092064b 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/dependency-injection-made-easy-in-laminas-mezzio-applications.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/dependency-injection-made-easy-in-laminas-mezzio-applications.html.twig
@@ -149,7 +149,7 @@ class UserHandler implements RequestHandlerInterface
}
-And, that's not all.
+And, that's not all.
If you use doctrine and repository pattern and you don't want to get your repository from EntityManager and want to inject it into your service, this package covers that too. The principle is the same, and for more insight about this, you can check the package documentation at dot-dependency-injection.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/detecting-mobile-devices-in-dotkernel-1-6-0.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/detecting-mobile-devices-in-dotkernel-1-6-0.html.twig
index 334eb14d..ff49d5a2 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/detecting-mobile-devices-in-dotkernel-1-6-0.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/detecting-mobile-devices-in-dotkernel-1-6-0.html.twig
@@ -64,7 +64,7 @@ resources.useragent.wurflcloud.lib_dir = APPLICATION_PATH "/library/WurflCloud/"
Because of these changes we removed the old Dot_UserAgent_Wurfl class and added the new one Dot_UserAgent_WurflCloud wich is using the Wurfl Cloud API adapter.
-Example of Dot_UserAgent usage in DotKernel:
+Example of Dot_UserAgent usage in DotKernel:
Get Wurfl configuration
>$wurflConf = $registry->configuration->resources->useragent->wurflcloud;
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/doctrine-cache-using-symfony-cache.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/doctrine-cache-using-symfony-cache.html.twig
index 802349a4..5087b9e1 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/doctrine-cache-using-symfony-cache.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/doctrine-cache-using-symfony-cache.html.twig
@@ -44,7 +44,7 @@
In this article our focus will be on enabling the dot-cache component and effectively implementing caching in DotKernel Admin.
- Installation
+ Installation
Run the following command in your project directory:
composer require dotkernel/dot-cache
After installing, add the DotCacheConfigProvider::class class to your configuration aggregate (config/config.php).
Before we continue with the configuration process we need to know a few things about how and where the data is stored.
The dotkernel/dot-cache component is a wrapper that sits on top of symfony/cache. It currently supports two adapters and can store data in two distinct locations:
@@ -55,7 +55,7 @@
1. Storing data in-memory is the fastest and sometimes the cheapest caching mechanism, but it also comes with down-sides. Storing everything in the RAM memory is not the best idea when your application is running on a low memory system. In this case you should consider using the filesystem mechanism.
2. The second caching mechanism involves storing data into files on the local disk, known as the filesystem option. While this option may be slightly slower than the first one, it provides a more persistent storage solution.
Feel free to explore and use other adapters from symfony/cache by checking the official documentation.
- Configuration
+ Configuration
In configautoloaddoctrine.global.php, in the doctrine.configuration.orm_default key add the following entry:
'result_cache' => 'filesystem',
'metadata_cache' => 'filesystem',
@@ -76,17 +76,17 @@
Result cache
+Result cache
The result cache can be used to store the results of your queries, enabling Doctrine to avoid querying the database or hydrating the data again after the initial retrieval.
-Metadata cache
+Metadata cache
Parsing your class metadata on every request is inefficient. Instead, it's advisable to cache this information using one of the available cache adapters.
-Query cache
+Query cache
In a production environment, it's strongly recommended to cache the resulted DQL query into its SQL equivalent. Since the query doesn't change unless the DQL query itself changes, it's unnecessary to parse it multiple times.
-Hydration cache
+Hydration cache
Doctrine hydration cache is a feature that stores the results of data hydration, which is the process of converting raw database data into usable objects or arrays. By caching these results, it avoids repeating the hydration process for repeated queries, improving performance.
- How to use
+ How to use
To enable caching for entities, need to add the # attribute like in the following example:
#
#
#
class Admin extends AbstractEntity implements AdminInterface
{
}
For further details about the cache mode please refer to the official documentation.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/doctrine-enum-implementation-in-dotkernel.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/doctrine-enum-implementation-in-dotkernel.html.twig
index ef5e1d05..a65ed93d 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/doctrine-enum-implementation-in-dotkernel.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/doctrine-enum-implementation-in-dotkernel.html.twig
@@ -38,7 +38,7 @@
The update introduces the detection of enumType and options.values from a property with type: Types::ENUM. This PR discusses the update and links to several older relevant issues.
-Old setup
+Old setup
#
class Card
@@ -53,7 +53,7 @@ class Card
public Suit $suit;
}
-New setup
+New setup
#
class Card
@@ -72,7 +72,7 @@ class Card
Dotkernel's approach
-Old setup
+Old setup
Dotkernel uses flags for columns like User->Status, but we resorted to the simpler string type. The obvious disadvantage is that you can't definitively enforce a set of values for a given column. Sure, the PHP can be set up to only use the agrred upon set of values, but the database is independent from it. If you edit a value manually in the database, any string is accepted.
@@ -103,7 +103,7 @@ public function setStatus(string $status): self
$this->status = $status;
}
-New setup
+New setup
Thanks to the update of doctrine/orm to version 3.2.0, Dotkernel can now have a proper link between the PHP code and database values. Now the link between the PHP code and the database is explicit and enforced.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-1-5-0-released.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-1-5-0-released.html.twig
index 41e7cadb..76c5ead0 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-1-5-0-released.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-1-5-0-released.html.twig
@@ -33,19 +33,19 @@
After a longer wait than usual, DotKernel 1.5.0 was just released. Due to the large amount of changes and the long time spent in development, we chose to skip 1.4 and go straight to 1.5.0.
Here are a few of the many changes to DotKernel in the latest release:
-
-Highlights of 1.5.0
-Switched from Dojo to jQuery
+
+Highlights of 1.5.0
+Switched from Dojo to jQuery
Starting with 1.5.0 we've switched from using Dojo to jQuery. This doesn't mean you can't still use Dojo in your own projects, but only jQuery will be used and maintained in the DotKernel distribution.
-New designs
+New designs
We've redesigned the admin site, with new themes, and a dropdown menu, as well as a new and simpler design for the front-end.
-Model inheritance
+Model inheritance
Up until now, there was a lot of code duplication in models. For example, in the user model, you might have a getUserById function in the admin as well as the frontend. When you've got more models and more modules, your project can start having a lot of copy-pasted code.
To prevent this, we've introduced a Dot_Model class, and a way to define global models that are inherited in the admin and frontend. This way, you can have User class in the admin that only has methods specific to the admin module, a User class in the frontend that only has code specific for the frontend, and they both inherit the Dot_Model_User class which will have all the common code.
-Dashed controllers
+Dashed controllers
We've changed the way the controller name is parsed, so that you can have controller with multiple words, split with dashes, without breaking the coding standard (for example, www.example.com/search-article will call SearchArticleController.php)
-Zend Registry reorganization
+Zend Registry reorganization
We've changed the structure of the registry, for more about this, please check this blog post.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-1-8-0-lts-released.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-1-8-0-lts-released.html.twig
index 8db2ab00..de8252b9 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-1-8-0-lts-released.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-1-8-0-lts-released.html.twig
@@ -31,30 +31,30 @@
DotKernel 1.8.0 (LTS) was just released.
-What is LTS?
-
+What is LTS?
+
Long-term support (LTS) is a type of special versions or editions of software designed to be supported for a longer than normal period. It is particularly applicable to open-source software projects. It contains many bug fixes, some refactoring and a few minor features. Find more details read this article.
Here are a few of the many changes to DotKernel in the latest release:
-
-Highlights of 1.8.0 (LTS)
+
+Highlights of 1.8.0 (LTS)
-Plugin Architecture
+Plugin Architecture
Starting with 1.8.0 we will start using Plugins to make the DotKernel extending easier. We'll keep you up to date about how you create and use a plugin.
-New design
+New design
We've redesigned the admin module and the frontend module is now mobile-friendly, but you can still use the mobile module.
-Loads Faster
+Loads Faster
The DotKernel framework just got a big boost because it supports APC & File Caching within the framework, all the XML's and config files are cached in order to maximize response speed for more information about caching and how to cache your data see this article.
-Easier Request Handling
+Easier Request Handling
We've added a new class, Dot_Request, which lets you have control over the request data before you use it, for example the variables $_SERVER, $_GET and $_POST are only used within controllers.
-Features added
+Features added
-Other changes
+Other changes
-Bug Fixes
+Bug Fixes
-
+
Dotkernel Light is a good starting point for a project if you want to have full control over the functionality it contains. It easily grows into something more complex with the integration of packages based on your requirements.
@@ -74,7 +74,7 @@
In this article we explore how to use Dotkernel Light for a simple presentation site. We will mention what files to focus on to teach you how to add more pages of content to your site and how to manage their assets.
-Adding new pages
+Adding new pages
The first step is to add the new pages in src/Page/src/Controller/PageController.php. This means adding an Action function for each page, as seen below.
@@ -126,7 +126,7 @@
Optional items
-Twitter and OpenGraph cards
+Twitter and OpenGraph cards
If you want to promote the pages on other platforms, a helpful item is the header section in the src/App/templates/layout/default.html.twig file. This is where the Twitter (X) and OpenGraph cards should be placed.
@@ -157,7 +157,7 @@
<meta property="og:image" content="{{ url('home') }}images/app/My-image.png"/>
<meta property="og:description" content="Basic description"/>
-Top menu
+Top menu
This menu is displayed on all of the pages, in the header. To edit it, go to src/App/templates/layout/default.html.twig and update the items under id="navbarHeader". You can use the below as an example.
@@ -175,7 +175,7 @@
You can also replace the nav-item class for the li elements with button-border for a link that looks more like a button.
-Footer
+Footer
To edit the footer on all of the pages, search for <footer class="app-footer"> in the src/App/templates/layout/default.html.twig template. We won't include an example here, since the content is usually basic HTML and CSS with twig elements already covered in this article.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-reserved-variable-names-for-caching.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-reserved-variable-names-for-caching.html.twig
index 6b66e1e6..99e0720b 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-reserved-variable-names-for-caching.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-reserved-variable-names-for-caching.html.twig
@@ -33,21 +33,21 @@
This article is related to: Caching in DotKernel with Zend Framework Cache
The variables that DotKernel cache are below:
-Router
+Router
Router is the object that load routes (modules, controllers, actions) settings from router.xml file. More info about router: http://www.dotkernel.com/docs/router-xml/
The router is cached as router.
-Auth / ACL Role
-
+Auth / ACL Role
+
The object which authorizes user methods (aka Dot_Auth), used in all DotKernel Applications, Dot_Auth uses /configs/acl/role.xml to define the users rights.
The role.xml file is cached as acl_role.
-Menu
+Menu
The menu.xml from current module(what is a module?)
More about menu.xml : http://www.dotkernel.com/docs/menu-xml/
The menu is cached as admin_menu, frontend_menu.
-Options
+Options
The options are the ones found in /configs/dots/ and have the following naming format: option_MODULE_CONTROLLER.
MODULE is the current module and CONTROLLER is the current controller or "seo", so the options cache entries will look like:
@@ -56,7 +56,7 @@ MODULE is the current module and CONTROLLER is the current controller or "seo",
Browser & OS
+Browser & OS
The browser.xml and os.xml are used to identify the Browser and OS name, icon, and type. Theese XML files are located in /configs/useragent/.
Browser & OS are cached as browser_xml and os_xml.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-template-engine.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-template-engine.html.twig
index 09ff94a4..523be2d1 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-template-engine.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-template-engine.html.twig
@@ -30,9 +30,9 @@
-
+
-DotKernel Template Engine is an implementation of PHPLib Template engine for PHP5.
+DotKernel Template Engine is an implementation of PHPLib Template engine for PHP5.
It has an amazing ability to separate the application code from the presentation layer. Separates the manipulation of data (in the database as well as in PHP) from its final format, whether that format is HTML, XML or a formatted e-mail. The big advantage is that is allowing us to change the look and feel of a site quickly without having to delve immediately into a lot of PHP variable assignments and print statements.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-version-1-0-in-action.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-version-1-0-in-action.html.twig
index 92e14851..98e44f3d 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-version-1-0-in-action.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/dotkernel-version-1-0-in-action.html.twig
@@ -38,7 +38,7 @@
It has eliminated the complexity of Zend Framework by using a different approach of how the web request are handled.
-From Zend Framework, DotKernel is using only the necessary classes:
+From Zend Framework, DotKernel is using only the necessary classes:
Sources:
+Sources:
PEAR Channel Migration Guide
+PEAR Channel Migration Guide
Use the PEAR installer:
1. Remove the installed pear package
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/new-features-in-zend-framework-1-12.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/new-features-in-zend-framework-1-12.html.twig
index ae50bbda..26f2df3b 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/new-features-in-zend-framework-1-12.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/new-features-in-zend-framework-1-12.html.twig
@@ -31,7 +31,7 @@
According to Matthew Weier O'Phinney announcement, Zend Framework team is pleased to announce the immediate availability of the first release candidate of the Zend Framework 1.12 series, 1.12.0RC1
- New Features
+ New Features
Zend_Gdata_Analytics is an extension to Zend_Gdata to allow interaction with Google's Analytics Data Export API. This extension does not encompass any major changes in the overall operation of Zend_Gdata components.
Zend_Gdata_Analytics was contributed by Daniel Hartmann.
-Removed features
+Removed features
Due to the changes in licensing of WURFL, we have removed the WurflApi adapter. We will be providing the WurflApi adapter to ScientiaMobile so that users of WURFL will still have that option.
-Bug Fixes
+Bug Fixes
In addition over 200 reported issues in the tracker have been fixed. We'd like to particularly thank Adam Lundrigan, Frank Brückner and Martin Hujer for their efforts in making this happen. Thanks also to the many people who ran the ZF1 unit tests and reported their results!
For a complete list go here: http://framework.zend.com/issues/secure/IssueNavigator.jspa?requestId=12877
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/replacing-laminas-mail-with-symfony-mailer-in-dot-mail.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/replacing-laminas-mail-with-symfony-mailer-in-dot-mail.html.twig
index 2e5f4bb4..7a0ed880 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/replacing-laminas-mail-with-symfony-mailer-in-dot-mail.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/replacing-laminas-mail-with-symfony-mailer-in-dot-mail.html.twig
@@ -30,7 +30,7 @@
-
+
What prompted the change
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/using-dotkernel-with-composer-dependencies.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/using-dotkernel-with-composer-dependencies.html.twig
index f926d208..524450b9 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/using-dotkernel-with-composer-dependencies.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/using-dotkernel-with-composer-dependencies.html.twig
@@ -37,16 +37,16 @@ There is also an article explaining how composer can be added to DotKernel Zend Framework 1 as the Non-Namespaced dependency and Zend Framework 2 as the Namespaced dependency.
-The Composer Dependencies
+The Composer Dependencies
ZendFramework 1 Barcode module can only be loaded with the ZF1 itself:
>composer require 'zendframework/zendframework1'
The ZendFramework 2 Barcode module can be separately loaded:
>composer require 'zendframework/zend-barcode'
-Important note
+Important note
These dependencies can be used anywhere after the Dot_Kernel::initialize() function was called
-Using Non-Namespaced Dependencies (Zend Framework 1)
+Using Non-Namespaced Dependencies (Zend Framework 1)
The class is loaded PSR-0 style, meaning the class name looks like VendorName_PackageName_ClassName
>// Only the text to draw is required
$barcodeOptions = array('text' =>; 'ZEND-FRAMEWORK');
@@ -60,7 +60,7 @@ Zend_Barcode::factory(
'code39', 'image', $barcodeOptions, $rendererOptions
)->render();
-Using Namespaced Dependencies (Zend Framework 2)
+Using Namespaced Dependencies (Zend Framework 2)
The class is loaded PSR-4 style, meaning the class name looks like \VendorName\PackageName\ClassName
>use Zend\Barcode\Barcode;
@@ -75,11 +75,11 @@ $rendererOptions = array();
Barcode::factory(
'code39', 'image', $barcodeOptions, $rendererOptions
)->render();
-The result
+The result
Both the examples will render the following barcode if nothing goes wrong:
Resulting barcode.
Source: bit.ly/1XbZZ81
-Tip
+Tip
In this case the first example will work for both namespaced an non-namespaced dependencies if we add the the following as the first line at the first example:
>use Zend\Barcode\Barcode as Zend_Barcode;
Now we can use any of the following to access ZF2's Barcode Module:
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/using-utf8-charset-in-dotkernel.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/using-utf8-charset-in-dotkernel.html.twig
index ce47a0ee..93baccbf 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/using-utf8-charset-in-dotkernel.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/using-utf8-charset-in-dotkernel.html.twig
@@ -33,13 +33,13 @@
In order to use UTF8 encoding in your DotKernel based system, is needed to make some changes in both database structure and in the application.ini file.
Those changes are commited into DotKernel 1.6.0 dev codebase, which will be released in next days.
-Database
+Database
set for all tables and columns proper collation , either utf8_general_ci or utf8_bin
-Application.ini
+Application.ini
add the line
>database.params.charset = utf8
to your application.ini file, in the area.
-Differences between utf8_general_ci and utf8_bin
+Differences between utf8_general_ci and utf8_bin
utf8_bin: compare strings by the binary value of each character in the string
utf8_general_ci: compare strings using general language rules and using case-insensitive comparisons
diff --git a/src/Blog/templates/page/blog-resource/dotkernel/zend-console-implementation-in-dotkernel.html.twig b/src/Blog/templates/page/blog-resource/dotkernel/zend-console-implementation-in-dotkernel.html.twig
index 9ab776d0..e660adf6 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel/zend-console-implementation-in-dotkernel.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel/zend-console-implementation-in-dotkernel.html.twig
@@ -35,7 +35,7 @@ Starting with 1.5, DotKernel has a Console bootstrap to easily run PHP scripts f
The bootstrap can be found in Console/index.php and it has one controller in Controller.php with two example actions.
-Usage
+Usage
Currently there are two command line arguments:
Examples
+Examples
>/var/www/vhosts/example.com/httpdocs/Cron/index.php -e staging -a count-users
>/var/www/vhosts/example.com/httpdocs/Cron/index.php -e staging -a send-newsletter "test newsletter"
diff --git a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-admin-v4.html.twig b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-admin-v4.html.twig
index 1cf61946..03bc4a33 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-admin-v4.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-admin-v4.html.twig
@@ -52,11 +52,11 @@
Dotkernel Admin V4 Features
-PHP 8.1
+PHP 8.1
Dotkernel Admin V4 fully supports PHP 8.1 with a minimum requirement of PHP 7.4.
-Configurability
+Configurability
From managing middleware order to simply adding an API key to you application the config directory is the way to go.
@@ -102,7 +102,7 @@
]
]
-Authorization Guards
+Authorization Guards
The packages responsible for restricting access to certain parts of the application are dot-rbac-guard and dot-rbac. These packages work together to create an infrastructure that is customizable and diversified to manage user access to the platform by specifying the type of role the user has.
@@ -155,7 +155,7 @@
]
]
-CLI
+CLI
For registering new command first make sure your command class extends Symfony\Component\Console\Command\Command, then you can enable the command by registering it in config/autoload/cli.global.php.
@@ -169,7 +169,7 @@
Note: You can take as example Dot\Cli\Command\DemoCommand
-Routing
+Routing
Providing each Module with a RoutesDelegator.php file for managing existing routes inside that specific module and an easy way of adding new ones providing the route path, Middleware that the route will use, an array of accepted methods and the route name.
@@ -185,7 +185,7 @@
Note: The optional attributes on the route path are marked between [] like
-Frontend
+Frontend
As for the frontend toolkit we chose to use Bootstrap 4.5.0 in combination with Fontawesome 5.0.6 for a minimalist but efficient design.
@@ -221,7 +221,7 @@
Note: You`ll find in the #tableToolbar buttons that toggle a modal for adding/editing/deleting admins.
-
+
{{ include('@partial/post-nav.html.twig') }}
diff --git a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-admin-version-3-launched.html.twig b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-admin-version-3-launched.html.twig
index deb9061e..880a49fd 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-admin-version-3-launched.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-admin-version-3-launched.html.twig
@@ -31,7 +31,7 @@
-Dotkernel Admin PHP Application version 3 was launched.
+Dotkernel Admin PHP Application version 3 was launched.
@@ -47,7 +47,7 @@
Live demo: admin.dotkernel.net
-Changelog:
+Changelog:
Branch 3.0 is the current and default branch , and :
diff --git a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-api-architecture-and-components.html.twig b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-api-architecture-and-components.html.twig
index 2e8488ea..29d3b1b6 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-api-architecture-and-components.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-api-architecture-and-components.html.twig
@@ -215,7 +215,7 @@
-Doctrine 2 ORM
+Doctrine 2 ORM
For the persistence in a relational database management system we chose Doctrine ORM (object-relational mapper).
@@ -224,7 +224,7 @@
The benefit of Doctrine for the programmer is the ability to focus on the object-oriented business logic and worry about persistence only as a secondary priority.
-Documentation
+Documentation
Our documentation is Postman based. We use the following files in which we store information about every available endpoint ready to be tested:
@@ -254,31 +254,31 @@
-Hypertext Application Language
+Hypertext Application Language
For our API payloads (a value object for describing the API resource, its relational links and any embedded/child resources related to it) we chose mezzio-hal.
-CORS
+CORS
By using MezzioCorsMiddlewareCorsMiddleware, the CORS preflight will be recognized and the middleware will start to detect the proper CORS configuration. The Router is used to detect every allowed request method by executing a route match with all possible request methods. Therefore, for every preflight request, there is at least one Router request.
-OAuth 2.0
+OAuth 2.0
OAuth 2.0 is an authorization framework that enables applications to obtain limited access to user accounts on your Dotkernel API. We are using mezzio/mezzio-authentication-oauth2 which provides OAuth 2.0 authentication for Mezzio and PSR-7/PSR-15 applications by using league/oauth2-server package.
-Email
+Email
It is not unlikely for an API to send emails depending on the use case. Here is another area where Dotkernel API shines. Using DotMailServiceMailService provided by dotkernel/dot-mail you can easily send custom email templates.
-Configuration
+Configuration
From authorization at request route level to API keys for your application, you can find every configuration variable in the config directory.
@@ -293,7 +293,7 @@
You can further customize your api within the autoload directory where each configuration category has its own file.
-Routing
+Routing
Each module has a RoutesDelegator.php file for managing existing routes inside that specific module. It also allows an quick way of adding new routes by providing the route path, Middlewares that the route will use and the route name.
@@ -302,13 +302,13 @@
You can allocate permissions per route name in order to restrict access for a user role to a specific route in config/autoload/authorization.global.php.
-Commands
+Commands
For registering new commands first make sure your command class extends SymfonyComponentConsoleCommandCommand. Then you can enable it by registering it in config/autoload/cli.global.php.
-File locker
+File locker
Here you will also find our brand new file locker configuration so you can easily turn it on or off ( by default: 'enabled' => true )
@@ -317,7 +317,7 @@
Note: The File Locker System will create a command-{command-default-name}.lock file which will not let another instance of the same command to run until the previous one has finished.
-PSR Standards
+PSR Standards
@@ -371,7 +371,7 @@
-Tests
+Tests
One of the best ways to ensure the quality of your product is to create and run functional and unit tests. You can find factory-made tests in the tests/AppTest/ folder, and you can also register your own.
diff --git a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-frontend-version-3-launched.html.twig b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-frontend-version-3-launched.html.twig
index 3cc74b59..384dce08 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-frontend-version-3-launched.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel-frontend-version-3-launched.html.twig
@@ -30,7 +30,7 @@
-Dotkernel Frontend PHP Application version 3 was launched.
+Dotkernel Frontend PHP Application version 3 was launched.
@@ -42,7 +42,7 @@
Live demo: v3.dotkernel.net
-Changelog:
+Changelog:
Branch 3.0 is the current and default branch , and :
diff --git a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel3-stable-release-version-1-0.html.twig b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel3-stable-release-version-1-0.html.twig
index 826ab505..0de2fd8c 100644
--- a/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel3-stable-release-version-1-0.html.twig
+++ b/src/Blog/templates/page/blog-resource/dotkernel3/dotkernel3-stable-release-version-1-0.html.twig
@@ -43,23 +43,21 @@ admin -> this guide.
-
-
-What's new
+What's new
-Changes
+Changes
-Packages Updated
+Packages Updated
-Zend Packages (support) Updated
+Zend Packages (support) Updated
-Packages Removed
+Packages Removed
The Dotkernel development team is actively working on investigating and implementing recommended design patterns. All Dotkernel applications and a large number of packages are still receiving updates that implement bugfixes, improvements and recommendations from the PHP community. Some updates may brake BC (backward compatibility), but this is often highlighted in companion articles that may also contain step-by-step tutorials. The Dotkernel team is available to help you with any issues related to the Dotkernel and Laminas apps and components.
-Additional Resources
+Additional Resources
That's it! You are now logged in securely.
-Additional Resources
+Additional Resources
Setup
-Install package Mezzio CORS
+Install package Mezzio CORS
Run the following command in your application’s root directory:
composer require mezzio/mezzio-cors
-Register ConfigProvider
+Register ConfigProvider
Open your application’s config/config.php file and add the following lines to the $aggregator variable:
@@ -60,7 +60,7 @@
Mezzio\Cors\ConfigProvider::class,
-Register Middleware
+Register Middleware
Open your application’s config/pipeline.php file and add the following line (preferrably between ErrorHandlerInterface::class and the handler/middleware that will return your response):
@@ -70,7 +70,7 @@
use Mezzio\Cors\Middleware\CorsMiddleware;
-Create config file
+Create config file
Create and open file config/autoload/cors.local.php and add the following code inside it:
diff --git a/src/Blog/templates/page/blog-resource/how-to/database-migrations-and-how-to-use-them.html.twig b/src/Blog/templates/page/blog-resource/how-to/database-migrations-and-how-to-use-them.html.twig
index baac4d0d..7ac2a372 100644
--- a/src/Blog/templates/page/blog-resource/how-to/database-migrations-and-how-to-use-them.html.twig
+++ b/src/Blog/templates/page/blog-resource/how-to/database-migrations-and-how-to-use-them.html.twig
@@ -30,7 +30,7 @@
-Migrations, the superhero your database deserves
+Migrations, the superhero your database deserves
Migrations ease the process of working together on projects, as well as deploying the database changes.
@@ -42,7 +42,7 @@ This article assumes that you're familiar with the basic concepts of migrations,
To recap the article above, a database migration in a change in the database schema.
-Benefits
+Benefits
By using migrations and seeders, you ensure a better workflow for teams, as changes to the database no longer require convoluted messages. It also ensures that all team members use the same types with the same limits on each column, and someone doesn't have VARCHAR(50) while another has VARCHAR(150). It keeps the database synchronised throughout the team with minimal effort.
When pushing to production, the deployment script will automatically run the migrations and keep the database schema in sync with the codebase.
@@ -50,13 +50,13 @@ When pushing to production, the deployment script will automatically run the mig
It requires no manual SSH'ing into production servers and no risky manual changes to production databases.
-Getting started
+Getting started
To setup migrations, simply follow the installation instructions in the package provided for DotKernel.
After the package has been successfully setup, you're ready to go.
To see the available commands, simply write "php dot" in a console that's located in your project root.
-How to use migrations in my project?
+How to use migrations in my project?
Migrations are very easily adapted to any project.
-Acknowledgements
+Acknowledgements
The images in the article shows screenshots from MySQL Workbench, and the migration package used is Phinx
diff --git a/src/Blog/templates/page/blog-resource/how-to/doctrine-cache-in-mezzio-and-dotkernel.html.twig b/src/Blog/templates/page/blog-resource/how-to/doctrine-cache-in-mezzio-and-dotkernel.html.twig
index e1e06379..c0d1c221 100644
--- a/src/Blog/templates/page/blog-resource/how-to/doctrine-cache-in-mezzio-and-dotkernel.html.twig
+++ b/src/Blog/templates/page/blog-resource/how-to/doctrine-cache-in-mezzio-and-dotkernel.html.twig
@@ -79,7 +79,7 @@
]
]
-Usage
+Usage
$query = $em->createQuery('select u from \Entities\User u');
$query->useQueryCache(true);
@@ -94,7 +94,7 @@ $query->useQueryCache(true);
]
]
-Usage
+Usage
$query = $em->createQuery('select u from \Entities\User u');
$query->enableResultCache();
diff --git a/src/Blog/templates/page/blog-resource/how-to/implementation-of-seo-friendly-url-in-an-generic-laminas-mezzio-app.html.twig b/src/Blog/templates/page/blog-resource/how-to/implementation-of-seo-friendly-url-in-an-generic-laminas-mezzio-app.html.twig
index 8a3ac76f..03486a64 100644
--- a/src/Blog/templates/page/blog-resource/how-to/implementation-of-seo-friendly-url-in-an-generic-laminas-mezzio-app.html.twig
+++ b/src/Blog/templates/page/blog-resource/how-to/implementation-of-seo-friendly-url-in-an-generic-laminas-mezzio-app.html.twig
@@ -48,7 +48,7 @@
How to implement slugs into Dotkernel, a practical example:
+How to implement slugs into Dotkernel, a practical example:
Let's consider we want to implement a feature that gives users the possibility to view other user's profile.
diff --git a/src/Blog/templates/page/blog-resource/how-to/list-available-endpoints-in-dotkernel-api-using-dot-cli.html.twig b/src/Blog/templates/page/blog-resource/how-to/list-available-endpoints-in-dotkernel-api-using-dot-cli.html.twig
index c7861d79..62c0d8bf 100644
--- a/src/Blog/templates/page/blog-resource/how-to/list-available-endpoints-in-dotkernel-api-using-dot-cli.html.twig
+++ b/src/Blog/templates/page/blog-resource/how-to/list-available-endpoints-in-dotkernel-api-using-dot-cli.html.twig
@@ -97,7 +97,7 @@
The filters are case-insensitive and can be combined.
-Example
+Example
Let's find which path should one call to register their user account. For this we will list routes where method is POST and name contains the string register:
diff --git a/src/Blog/templates/page/blog-resource/how-to/replacing-dot-console-with-dot-cli-based-on-laminas-cli.html.twig b/src/Blog/templates/page/blog-resource/how-to/replacing-dot-console-with-dot-cli-based-on-laminas-cli.html.twig
index b3876ca8..6bb8ae01 100644
--- a/src/Blog/templates/page/blog-resource/how-to/replacing-dot-console-with-dot-cli-based-on-laminas-cli.html.twig
+++ b/src/Blog/templates/page/blog-resource/how-to/replacing-dot-console-with-dot-cli-based-on-laminas-cli.html.twig
@@ -40,23 +40,23 @@
Setup
-Install package
+Install package
Run the following command in your application's root directory:
composer require dotkernel/dot-cli
-Register ConfigProvider
+Register ConfigProvider
Open your application's config/config.php file and add Dot\Cli\ConfigProvider::class, under the DK packages comment.
-Create bootstrap file
+Create bootstrap file
Locate the provided vendor/dotkernel/dot-cli/bin/cli.php and copy it into your application's bin directory.
This is the file you will execute your commands through.
-Create config file
+Create config file
Locate the provided vendor/dotkernel/dot-cli/config/autoload/cli.global.php and copy it into your application's config/autoload directory.
diff --git a/src/Blog/templates/page/blog-resource/how-to/using-postman-for-documentation-in-dotkernel-api-3.html.twig b/src/Blog/templates/page/blog-resource/how-to/using-postman-for-documentation-in-dotkernel-api-3.html.twig
index 836e5025..1dc7b89d 100644
--- a/src/Blog/templates/page/blog-resource/how-to/using-postman-for-documentation-in-dotkernel-api-3.html.twig
+++ b/src/Blog/templates/page/blog-resource/how-to/using-postman-for-documentation-in-dotkernel-api-3.html.twig
@@ -54,7 +54,7 @@
There are more terms to cover, like Mock servers, Monitors etc but they are not relevant yet in our case.
-Importing documentation files
+Importing documentation files
Open Postman (and log in if you have an account), then follow the below steps:
@@ -73,7 +73,7 @@ NAME FORMAT IMPORT AS
For more information on importing files into Postman, please consult their docs.
-Interacting with the environment
+Interacting with the environment
On the top right corner of Postman, you'll see the Environment quick look button (it looks like an eye). On it's left side, there's a dropdown with all available environments, one of the being called DotKernel_API - click on it to set it as the active environment.
@@ -89,13 +89,13 @@ VARIABLE INITIAL VALUE CURRENT_VALUE
Usage
-Creating a new request
+Creating a new request
Inside the collection, right-click on any folder and click Add Request. The new request is automatically opened in a new tab, where you will:
-Sending a request
+Sending a request
Once opened, you can immediately send a request by clicking the Send button.
@@ -105,7 +105,7 @@ VARIABLE INITIAL VALUE CURRENT_VALUE
The collection provided by DotKernel API 3 comes with some built-in security features.
-Global security
+Global security
Due to the hierarchy of the Collection, all requests are children of the Collection's root folder, so they automatically inherit it's Authorization settings. If you edit the Collection's root folder, you will find the following tabs:
@@ -115,7 +115,7 @@ VARIABLE INITIAL VALUE CURRENT_VALUE
To disable this feature at folder/request level, edit the folder/request and set Type to No Auth under the Authorization tab.
-Automatic Token storage
+Automatic Token storage
Once an authorization token is re/generated, two environment variables are set/updated:
@@ -129,11 +129,11 @@ VARIABLE INITIAL VALUE CURRENT_VALUE
TIP: You can inspect your application's documentation at any moment by clicking on the three horizontal dots (you will find them on hover next to your collection's name) then click on View documentation.
-Exporting collection
+Exporting collection
Click on the same three horizontal dots, then select Export. You will be presented an Export collection modal asking you to choose the format of the export. Unless specified, choose the recommended version, then click Export. When asked to save the exported file, choose to overwrite your application's collection file (documentaion/DotKernel_API.postman_collection.json).
-Export environment
+Export environment
This step is optional. It is needed only if you made modifications to the environment, else you can skip it.
diff --git a/src/Blog/templates/page/blog-resource/how-to/using-the-urlgenerator-work-in-fastroute.html.twig b/src/Blog/templates/page/blog-resource/how-to/using-the-urlgenerator-work-in-fastroute.html.twig
index ea1bb6f2..dbcd1230 100644
--- a/src/Blog/templates/page/blog-resource/how-to/using-the-urlgenerator-work-in-fastroute.html.twig
+++ b/src/Blog/templates/page/blog-resource/how-to/using-the-urlgenerator-work-in-fastroute.html.twig
@@ -35,14 +35,14 @@ DotKernel 3 uses FastRoute under the hood, which is an excellent an
A wrong setup can lead to many headaches, as it's not prominent that the error you're experiencing is from FastRoute, and you may not know where exactly to look for the cause.
To save you some time, here's a how-to for creating and using routes in DotKernel 3.
-Declaring routes
+Declaring routes
When defining routes in the routes.php file, they need to follow a specific pattern, a usual route would look like this:
>$app->route('/page', , , 'page');
Notice the '/page' part, as this is crucial. FastRoute cannot handle a slash-suffix, which means that /page will give you the indexAction, whereas /page/ will give you a 404.
To prevent the URLGenerator from adding a slash-suffix, we need to make sure that the optional slash is included in the optional block. The above example is correct, if we instead wrote it like this, it'd be woefully bad.
>$app->route('/page/', , , 'page');
Notice that the slash has changed places and is now outside the optional block. This would generate a /page/ route for the index action, which is bad, so always include any optional parts, even slashes, in the optional block.
-Referencing routes
+Referencing routes
Developers are used to hand-write and hard-code URLs into anchor tags, but this is a bad idea, as a URL may change and then you'd have to go through the entire app to find every single reference for it. Instead, every route we define has a name that can be used to reference it in the URLGenerator.
>$app->route('/page', , , 'page');
That very last part there, that's the route name, which can be referenced in any view or controller to generate a route to a specific route in the app.
diff --git a/src/Blog/templates/page/blog-resource/how-to/what-is-cross-origin-token-redemption.html.twig b/src/Blog/templates/page/blog-resource/how-to/what-is-cross-origin-token-redemption.html.twig
index 2a9e2cd7..068fed89 100644
--- a/src/Blog/templates/page/blog-resource/how-to/what-is-cross-origin-token-redemption.html.twig
+++ b/src/Blog/templates/page/blog-resource/how-to/what-is-cross-origin-token-redemption.html.twig
@@ -30,13 +30,13 @@
-What is cross origin token redemption?
+What is cross origin token redemption?
Cross-origin token redemption is a technique used to ensure the security and authenticity of a token that is issued by one website or domain, but intended for use on a different website or domain. This process is commonly used in situations where a user needs to access resources from multiple domains, such as when a user is logged in to one website and needs to access resources from another website.
When a token is issued from one domain, it is typically encrypted and signed to prevent tampering and ensure that it can only be used by the intended recipient. When the token is redeemed on a different domain, the receiving domain must first verify the authenticity of the token by checking the signature and decrypting the token.
-JSON Web Token (JWT)
+JSON Web Token (JWT)
One common method of cross-origin token redemption is to use the JWT standard. JWTs are a compact, URL-safe means of representing claims to be transferred between two parties. They consist of three parts:
@@ -49,7 +49,7 @@
In order to redeem a JWT on a different domain, the receiving domain must first verify the signature using the algorithm specified in the header and the secret key that was used to sign the token. Once the signature is verified, the domain can then read the claims from the payload to determine if the user is authorized to access the requested resources.
-OAuth 2.0
+OAuth 2.0
Another method of cross-origin token redemption is to use the OAuth 2.0 standard. OAuth 2.0 is an open standard for authorization that enables a third-party application to obtain limited access to an HTTP service. In this method, when a user is logged in to one website and wants to access resources from another website, the first website will redirect the user to the second website and pass a token. The second website will then validate the token and provide the user with access to the requested resources.
diff --git a/src/Blog/templates/page/blog-resource/javascript/codelobster-php-edition-free-php-html-css-javascript-editor-ide.html.twig b/src/Blog/templates/page/blog-resource/javascript/codelobster-php-edition-free-php-html-css-javascript-editor-ide.html.twig
index 58e873ae..d1ce8287 100644
--- a/src/Blog/templates/page/blog-resource/javascript/codelobster-php-edition-free-php-html-css-javascript-editor-ide.html.twig
+++ b/src/Blog/templates/page/blog-resource/javascript/codelobster-php-edition-free-php-html-css-javascript-editor-ide.html.twig
@@ -30,7 +30,7 @@
-Free PHP, HTML, CSS, JavaScript editor (IDE) - Codelobster PHP Edition
+Free PHP, HTML, CSS, JavaScript editor (IDE) - Codelobster PHP Edition
For valuable work on creation of sites you need a good comfortable editor necessarily. There are many requiring paid products for this purpose, but we would like to select free of charge very functional and at the same time of simple in the use editor - Codelobster PHP Edition .
@@ -49,7 +49,7 @@
Also there are special plugins for work with:
+Also there are special plugins for work with:
After a recent analysis, we discovered that one of the upstream packages we use is licensed under LGPL v3. Even though we at DotKernel use the MIT license for our open source projects, the more restrictive license must be applied to the whole application. We implemented a workaround detailed below.
-Detailing the problem
+Detailing the problem
The package in question is matomo/device-detector which requires the developers to share their derivative code publicly. This goes against our contractual obligations to the client to keep their custom code business and enterprise friendly. The conflict that results in this scenario may cause legal issues in the future.
-The solution
+The solution
Some companies explicitly steer clear of scenarios of this nature and DotKernel has decided to do the same. Our solution for DotKernel applications and libraries is to discard the use of 3rd party packages with LGPL v3. In this particular case we used the matomo/device-detector package in our dotkernel/dot-user-agent-sniffer package for the purpose of identifying the user agent and using the results in internal reports.
ALL of DotKernel's packages are licensed under MIT which has no restrictions regarding the source code, other than keeping the license and copyright notice in a file within each package. Other non-restrictive licenses include Apache-2.0, BSD-2-Clause, BSD-3-Clause, ISC, MPL-2.0 and OSL-3.0. Some of them are used by the dependencies in DotKernel’s packages instead of MIT, but are still deemed acceptable.
-The resolution
+The resolution
The dotkernel/dot-user-agent-sniffer package must follow the LGPL v3 license, beginning with version 3.4.0. Our admin application will not use the features from matomo/device-detector, but will contain instructions on how to add the package, if other developers intend to use it.
-Important note
+Important note
Warning: Any application using dotkernel/dot-user-agent-sniffer with a version lower than 3.4.0 is still a legal liability. We at DotKernel will not abandon the issue as is, but are looking into a solution to bring back the device detector functionality in the future under a less restrictive license. For now we will not include dotkernel/dot-user-agent-sniffer in any of our applications by default.
diff --git a/src/Blog/templates/page/blog-resource/middleware/replacing-controllers-with-psr-15-compliant-handlers-in-dotkernel-light.html.twig b/src/Blog/templates/page/blog-resource/middleware/replacing-controllers-with-psr-15-compliant-handlers-in-dotkernel-light.html.twig
index 3751aac5..c4f91969 100644
--- a/src/Blog/templates/page/blog-resource/middleware/replacing-controllers-with-psr-15-compliant-handlers-in-dotkernel-light.html.twig
+++ b/src/Blog/templates/page/blog-resource/middleware/replacing-controllers-with-psr-15-compliant-handlers-in-dotkernel-light.html.twig
@@ -30,7 +30,7 @@
-
+
The goal of this update is to implement PSR-15 handlers into Dotkernel Light. There are several advantages to using handlers, which we will explore below.
diff --git a/src/Blog/templates/page/blog-resource/php-development/database-seeding-doctrine-data-fixtures-vs-phinx.html.twig b/src/Blog/templates/page/blog-resource/php-development/database-seeding-doctrine-data-fixtures-vs-phinx.html.twig
index 0ab5f734..7b7053e7 100644
--- a/src/Blog/templates/page/blog-resource/php-development/database-seeding-doctrine-data-fixtures-vs-phinx.html.twig
+++ b/src/Blog/templates/page/blog-resource/php-development/database-seeding-doctrine-data-fixtures-vs-phinx.html.twig
@@ -48,7 +48,7 @@
-NOTE:
+NOTE:
The package dotkernel/dot-data-fixture does NOT depend on other DotKernel packages. The only dependency is Doctrine
@@ -113,7 +113,7 @@ ConsoleRunner::run(
Usage
-List all available fixtures, by order of execution:
+List all available fixtures, by order of execution:
php bin/doctrine fixtures:list
@@ -121,7 +121,7 @@ ConsoleRunner::run(
By using this command you can check the execution order of your fixtures before executing them.
-Executing fixtures:
+Executing fixtures:
To execute all fixtures run : php bin/doctrine fixtures:execute
diff --git a/src/Blog/templates/page/blog-resource/php-development/floating-point-arithmetic-why-is-int-0-7-0-1-10-7.html.twig b/src/Blog/templates/page/blog-resource/php-development/floating-point-arithmetic-why-is-int-0-7-0-1-10-7.html.twig
index c277d74a..9366652c 100644
--- a/src/Blog/templates/page/blog-resource/php-development/floating-point-arithmetic-why-is-int-0-7-0-1-10-7.html.twig
+++ b/src/Blog/templates/page/blog-resource/php-development/floating-point-arithmetic-why-is-int-0-7-0-1-10-7.html.twig
@@ -45,8 +45,8 @@ Now let's try it with 0.6 instead of 0.7
var_dump((0.6+0.1)*10); # float(7)
var_dump(intval((0.6+0.1)*10)); # int(7)
-
-How does the CPU understand these numbers?
+
+How does the CPU understand these numbers?
The CPU makes the calculations binary, the floating point numbers are represented as follows:
IEEE Short Real: 32 bits 1 bit for the sign, 8 bits for the exponent, and 23 bits for the mantissa. Also called single precision.
@@ -67,7 +67,7 @@ The float numbers are sign * exponent * this link.
-Why does this happen?
+Why does this happen?
Using this IEEE 754 converter we have found out that:
0.7 is actually represented as 0.699999988079071
@@ -82,7 +82,7 @@ The other example still shows 7 because 0.6 is actually represe
-But still ...
+But still ...
If we use echo and var_dump or if applying mathematical operations, PHP automatically adjusts the values, but intval and casting to int work on their bits before the values were adjusted
diff --git a/src/Blog/templates/page/blog-resource/php-development/mezzio-app-development-in-wsl2.html.twig b/src/Blog/templates/page/blog-resource/php-development/mezzio-app-development-in-wsl2.html.twig
index cdef3008..01bed6f3 100644
--- a/src/Blog/templates/page/blog-resource/php-development/mezzio-app-development-in-wsl2.html.twig
+++ b/src/Blog/templates/page/blog-resource/php-development/mezzio-app-development-in-wsl2.html.twig
@@ -34,19 +34,19 @@
This article will run you through the steps of installing a Mezzio application (DotKernel API) in WSL2 and run it on Ubuntu 20.04 LTS.
-Step 1:
+Step 1:
Make sure you have WSL2 installed on your machine by following this guide.
-Step 2:
+Step 2:
Install Ubuntu 20.0 LTS inside WLS2 as described here.
-Step 3:
+Step 3:
Create a virtualhost for your project using this guide.
-Step 4:
+Step 4:
Using your terminal, move into the virtualhost directory that you just created:
@@ -56,7 +56,7 @@
Make sure your data and log directories are writable by changing their permissions, as described here.
-Step 5:
+Step 5:
Setup PHPStorm to work with WSL2 files like in this article
diff --git a/src/Blog/templates/page/blog-resource/php-development/php-environment-development-staging-production.html.twig b/src/Blog/templates/page/blog-resource/php-development/php-environment-development-staging-production.html.twig
index d8c0e78d..09e02526 100644
--- a/src/Blog/templates/page/blog-resource/php-development/php-environment-development-staging-production.html.twig
+++ b/src/Blog/templates/page/blog-resource/php-development/php-environment-development-staging-production.html.twig
@@ -33,11 +33,11 @@
In hosted software development, the environment refers to a server tier designated to a specific stage in a release process. The purpose of these environments is to improve the development, testing and release processes in client-server applications. The most common environments are described below.
-Development
+Development
This is where the software is developed – it’s the working environment for individual developers or small teams. The purpose of this environment is for the developer to work on local host, separate from the rest of the team, allowing them to make various changes without worrying that it may alter the work of the other members of the team.
-Staging
+Staging
It is used to assemble, test and review the application before it goes into production. Usually the staging environment tries to simulate as much as possible the production environment (hardware and software-wise). Normally, before releasing an update version of the application on the production environment, the update must be tested on the staging environment. This environment can also be used as a demonstration/training environment.
-Production
+Production
It is the “live” environment, where the final application goes out to the world and becomes active.
To switch from one environment to another use the Subversion source code.
diff --git a/src/Blog/templates/page/blog-resource/php-development/using-php-7-express-in-zend-studio-13.html.twig b/src/Blog/templates/page/blog-resource/php-development/using-php-7-express-in-zend-studio-13.html.twig
index aca9cf27..477f7a0d 100644
--- a/src/Blog/templates/page/blog-resource/php-development/using-php-7-express-in-zend-studio-13.html.twig
+++ b/src/Blog/templates/page/blog-resource/php-development/using-php-7-express-in-zend-studio-13.html.twig
@@ -35,9 +35,9 @@ This article will cover the steps needed in order to check the PHP7 compatibilit
This article will also contain a compatibility issue check on the latest Zend Framework 1 version.
-What is PHP 7 Express?
+What is PHP 7 Express?
PHP 7 Express is the newest feature added in Zend Studio (from version 13). This feature is very useful for checking if your pre-PHP7 code will work on a PHP7 server.
-The project creation
+The project creation
If you already have the project backup and you are sure you can modify your project you can skip this step.
If you want to create a new project for testing instead of modifying the original project make sure the PHP Version is set to PHP 5.6 or the PHP Version you use in the project. Choosing the PHP 7 option will hide the PHP 7 Express feature because Zend Studio assumes a PHP 7 project doesn't need compatibility checks, but if the project is using a different version of PHP compatibility issues might apper.
@@ -45,7 +45,7 @@ If you want to create a new project for testing instead of modifying the origina
Long story short: Use the exact PHP version your project is using at the project creation.
The "New Local PHP Project" dialog in Zend Studio 13 and the PHP version selection
-The 'PHP Interpreter' selection
+The 'PHP Interpreter' selection
If the PHP 7 Express feature is won't show up the issue might be the PHP Interpreter selected.
To check and modify the PHP Interpreter:
@@ -58,7 +58,7 @@ To check and modify the PHP Interpreter:
Zend Studio PHP Interpreter Dialog
The PHP 7 Express feature should now show up.
-Project preparation
+Project preparation
As we created a local project named zend-framework-test we will add the latest Zend Framework 1 version in our project.
-Using PHP 7 Express - Testing Zend Framework 1
+Using PHP 7 Express - Testing Zend Framework 1
Now let's see PHP 7 Express in action. Using PHP 7 Express is very easy:
This article will cover the solution to the PEAR "Cannot use result of built-in function in write context" issue.
-The Issue
+The Issue
If installing a pear package (for instance PHP Code Sniffer), when running:
pear install PHP_CodeSniffer
This error is shown
@@ -42,7 +42,7 @@ This error is shown because the function is called by reference.
More details about this issue can be found in this Pull Request.
-The solution
+The solution
You might be tempted to execute the following
pear install Archive_Tar
which will result in the same error.
@@ -54,7 +54,7 @@ Go to the line indicated in the error (639 in this case) and replace:
with
$v_att_list = func_get_args();
The above means the func_get_args() isn't called by reference anymore.
-Our recommendation
+Our recommendation
The above does fix the problem, but we recommend installing the Archive_Tar again so you have the latest working version.
diff --git a/src/Blog/templates/page/blog-resource/php-troubleshooting/where-is-the-intl-php-extension-problem-solved.html.twig b/src/Blog/templates/page/blog-resource/php-troubleshooting/where-is-the-intl-php-extension-problem-solved.html.twig
index e78c85a2..8223cc72 100644
--- a/src/Blog/templates/page/blog-resource/php-troubleshooting/where-is-the-intl-php-extension-problem-solved.html.twig
+++ b/src/Blog/templates/page/blog-resource/php-troubleshooting/where-is-the-intl-php-extension-problem-solved.html.twig
@@ -57,7 +57,7 @@ If you have the bundled PHP version, the extension might be existing but not ena
Solutions
-For Linux-based Server (assuming you have root access):
+For Linux-based Server (assuming you have root access):