typo fixes

This commit is contained in:
Dennis Eichhorn 2020-07-11 21:35:41 +02:00
parent 2feeee7e7e
commit 6d8e52d31d
9 changed files with 23 additions and 22 deletions

View File

@ -1,12 +1,12 @@
# Dispatching
The dispatching is the follow up on the routing. In the dispatcher the route destination get resolved and executed. Dispatching can be performed on module instance methods, static functions and anonymous functions.
The dispatching is the follow up on the routing. In the dispatcher the route destination gets resolved and executed. Dispatching can be performed on module instance methods, static functions and anonymous functions.
The return of the `dispatch()` call is an array of all end point returns.
## Basic
The dispatcher accepts a string representation of the method or static function which should be dispatched, a closure which should be executed or an array of the above.
The dispatcher accepts a string representation of the method or static function which should be dispatched, a closure which should be executed or an array of the just mentioned options.
The `dispatch()` function accepts additionally a variable amount of parameters which will be passed to the routed method/function.
@ -38,7 +38,7 @@ $dispatcher->dispatch(function($para1, $para2) { ... }, $staticToCallPara1, $sta
## Routing
The dispatcher accepts the resoults from the `route()` method of the router which is an array of routes.
The dispatcher accepts the results from the `route()` method of the router which is an array of routes.
```php
$dispatcher->dispatch($router->route($request->getUri()->getRoute()));

View File

@ -1,6 +1,6 @@
## Cache
For caching the `CacheManager` provides access to the caching systems in place. Out of the box the CacheManager supports and automatically initializes either Redis or Memcached depending on the client configuration. The caching is not mandatory and therfor shouldn't be missuesed as in-memory database. It is not necessary to check if Redis or Memcached are available the CacheManager automatically handles the caching based on their existence.
For caching the `CacheManager` provides access to the caching systems in place. Out of the box the CacheManager supports and automatically initializes either Redis or Memcached depending on the client configuration. The caching is not mandatory and therefor shouldn't be misused as in-memory database. It is not necessary to check if Redis or Memcached are available the CacheManager automatically handles the caching based on their existence.
### HTTP Cache
@ -9,7 +9,7 @@ By default only stylesheets, javascript and layout images as well as module imag
Example usage for 30 days caching:
```php
$resposne->setHeader('Cache-Control', 'Cache-Control: max-age=2592000');
$response->setHeader('Cache-Control', 'Cache-Control: max-age=2592000');
```
In order to trigger a re-cache of stylesheets or javascript files make sure to update the version in the `Controller.php` file. This way version updates will result in a new virtual file uri and result in a re-cache.

View File

@ -2,6 +2,6 @@
## PHP
Only use cookies when absolutely necessary. Most of the time session data or local storage is the prefered choice. The `CookieJar` class provides you with all the necessary functionality similar to the `SessionManager`. The super global `$_COOKIE` is also overwritten and shouldn't be used anywhere.
Only use cookies when absolutely necessary. Most of the time session data or local storage is the preferred choice. The `CookieJar` class provides you with all the necessary functionality similar to the `SessionManager`. The super global `$_COOKIE` is also overwritten and shouldn't be used anywhere.
## JavaScript

View File

@ -1,6 +1,6 @@
# Sessions
Sessions are handled via the `SessionManager`. Sessions can be set and manipulated from the web application as well as the socket or console application.
Sessions are handled via the `SessionManager`. Sessions can be set and manipulated from the web application as well as the socket or console application.
## HTTP
@ -8,4 +8,4 @@ The Http session will be saved automatically, there is no need to access the sup
## Socket & Console
The session will be stored and assoziated with the logged in user in memory. A disconnect or quit is considered as a logout and therefor results in the destruction of the session object of this user and will be empty for the next login.
The session will be stored and associated with the logged in user in memory. A disconnect or quit is considered as a logout and therefor results in the destruction of the session object of this user and will be empty for the next login.

View File

@ -157,7 +157,7 @@ final class Installer extends InstallerAbstract
}
```
If your application doesn't need to implement any database tables for itself the switch statement can be omitted. From the directory structur at the beginning we can however see that some modules accept information form other modules. The following example shows how the navigation module is accepting information during the installation of other modules:
If your application doesn't need to implement any database tables for itself the switch statement can be omitted. From the directory structure at the beginning we can however see that some modules accept information form other modules. The following example shows how the navigation module is accepting information during the installation of other modules:
```php
public static function installExternal(Pool $dbPool, array $data)

View File

@ -11,7 +11,7 @@ Flexboxes are preferred for all content containers.
```html
<div class="row">
<div class="col-xs-12 col-sm-6 col-md-3 col-lg-1">
<section class="box wf-100">...</section>
<section class="portlet">...</section>
</div>
</div>
```
@ -26,7 +26,7 @@ A container (e.g. section, div, table, etc) can be sized by using `.wf-*` classe
## Icons
This project uses font-awesome for its icons, the following example allows for stacked icons e.g. creating new/undread email notifications:
This project uses font-awesome for its icons, the following example allows for stacked icons e.g. creating new/unread email notifications:
```html
<i class="fa fa-lg infoIcon fa-envelope">
@ -49,7 +49,7 @@ The following snippet creates a 100% input with a button next to it.
### Input with dictionary
The following snippet creates a dictionary button (e.g. for opening a popup window to search for accounts/groups etc) right befor an input field.
The following snippet creates a dictionary button (e.g. for opening a popup window to search for accounts/groups etc) right before an input field.
```html
<span class="input">
@ -63,18 +63,19 @@ The following snippet creates a dictionary button (e.g. for opening a popup wind
A section is a container for information that can and should be grouped together.
```html
<section class="box wf-100">
<h1>Title</h1>
<div class="inner">
<section class="portlet">
<div class="portlet-head">Title</div>
<div class="portlet-body">
...
</div>
<div class="portlet-foot">Footer</div>
</section>
```
Additional coloring of sections can be achieved by adding a coloring class.
```html
<section class="box green">
<section class="portlet green">
...
</section>
```

View File

@ -35,7 +35,7 @@ The following steps will setup the application, download all necessary tools and
After the installation you'll have access to the following content:
* Application: `http://127.0.0.1`
* Code Coverager: `http://127.0.0.1/Build/coverage/`
* Code Coverage: `http://127.0.0.1/Build/coverage/`
* Test Report: `${INSPECTION_PATH}/test/ReportExternal`
* Unit Test Report: `${INSPECTION_PATH}/test/testdox.txt`
* PHPStan Report: `${INSPECTION_PATH}/test/phpstan.json`

View File

@ -22,7 +22,7 @@ Now the event will be removed from the event manager once executed.
### Resetting events
In case an event should be reset (all conditions mut be met again befor it can be triggered) after it got successfully triggered one more parameter can be added.
In case an event should be reset (all conditions must be met again before it can be triggered) after it got successfully triggered one more parameter can be added.
```php
$eventManager->attach('eventId', function() { echo 'Hello World'; }, false, true);
@ -40,7 +40,7 @@ $eventManager->trigger('eventId');
## Multi Condition Events
In some cases it is required that multiple conditions are met before an event is supposed to be triggered. This can be achived by registering these conditions through the `addGroup()` function.
In some cases it is required that multiple conditions are met before an event is supposed to be triggered. This can be achieved by registering these conditions through the `addGroup()` function.
```php
$eventManager->addGroup('eventId', 'conditionName');
@ -58,8 +58,8 @@ $eventManager->trigger('eventId', 'conditionName'); // No output (if remove = fa
$eventManager->trigger('eventId', 'conditionName'); // No output (if remove = true)
```
The order in which these conditions are triggered doesn't mapper. A multi condition event SHOULD be atteched with the optional boolean parameter `true`. These events can only be executed once and will be removed afterwards. In case the optional boolean parameter was not set to `true` the event will remain in the event manager and will be triggered whenever `trigger('eventId')` is called.
The order in which these conditions are triggered doesn't mapper. A multi condition event SHOULD be attached with the optional boolean parameter `true`. These events can only be executed once and will be removed afterwards. In case the optional boolean parameter was not set to `true` the event will remain in the event manager and will be triggered whenever `trigger('eventId')` is called.
## Frontend vs. Backend
The only key difference between the frontend and backend implementation is that the frontend prevents runnning the same event in quick succession (less than 500 ms) in order to prevent undesired effects which can happen due to quick UI interaction.
The only key difference between the frontend and backend implementation is that the frontend prevents running the same event in quick succession (less than 500 ms) in order to prevent undesired effects which can happen due to quick UI interaction.

View File

@ -46,7 +46,7 @@ Some default parameters can be used for easier use.
While it's also possible to define parameters at the frontend and make use of the default values certain prefixes have a special meaning.
* \#somid = value of the element with the specified id
* \#someid = value of the element with the specified id
* .somclass = values of the elements with the specified class
### Dynamic Parameters