Skip to content

Update docs to v2 #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 3, 2023
Merged

Update docs to v2 #13

merged 1 commit into from
Jul 3, 2023

Conversation

kpicaza
Copy link
Member

@kpicaza kpicaza commented Jul 3, 2023

No description provided.

@kpicaza kpicaza added enhancement New feature or request Docs Add or update documentation labels Jul 3, 2023

## Hello World Example

Let's get started with a simple "Hello World" example to demonstrate the basic usage of the Antidot
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
Suggestions: PHP
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
Category: CASING

```

This code sets up a route that matches the root URL (`/`) and returns a simple HTML response with the
text "Hello, World!".
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
Suggestions: PHP
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
Category: CASING

{
public function handle(ServerRequestInterface $request): ResponseInterface
{
return new Response(200, ['Content-Type' => 'text/plain'], 'Hello, World!');
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
Suggestions: PHP
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
Category: CASING


### Accessing Configuration Settings

You can access configuration settings throughout your application using the `config` service provided by the dependency injection container. Here's an example of how you can access a configuration setting in a controller:
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
Suggestions: PHP
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
Category: CASING

### Container Configuration

The container configuration is defined in the `config/container.php` file. This file sets up the container
and defines the services and dependencies your application needs. You can use the container to define
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
Suggestions: PHP
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
Category: CASING

### Custom Error Handling

You can customize the error handling by creating your own error middleware and adding it to the pipeline.
This allows you to define specific error handling logic based on your application's requirements.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
Suggestions: PHP
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
Category: CASING


In the above example, the `CustomErrorMiddleware` implements the `MiddlewareInterface` and provides custom
error handling logic inside the `process()` method. When an exception is thrown during the request handling
process, the `process()` method catches the exception, generates an error response, and returns it.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
Suggestions: PHP
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
Category: CASING

services:
Doctrine\DBAL\Connection:
factory: App\Container\DoctrineDBALFactory
```php
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
Suggestions: PHP
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
Category: CASING

# message_type: action_service
some_message_type: some_action_service
other_message_type: some_action_service
```php
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
File types are normally capitalized. (FILE_EXTENSIONS_CASE[1])
Suggestions: PHP
URL: https://languagetool.org/insights/post/spelling-capital-letters/
Rule: https://community.languagetool.org/rule/show/FILE_EXTENSIONS_CASE?lang=en-US&subId=1
Category: CASING

Running the Antidot Framework application in a production environment requires proper port binding and
load balancer configuration. By specifying a custom port for the server and using tools like Nginx or
Caddy as load balancers, you can ensure that the application runs on the desired port and handles
incoming requests efficiently. Also crucial for ensuring its availability and resilience. By using process
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[LanguageTool] reported by reviewdog 🐶
A comma may be missing after the conjunctive/linking adverb ‘Also’. (SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA[1])
Suggestions: Also,
URL: https://languagetool.org/insights/post/linking-words/
Rule: https://community.languagetool.org/rule/show/SENT_START_CONJUNCTIVE_LINKING_ADVERB_COMMA?lang=en-US&subId=1
Category: PUNCTUATION

@kpicaza kpicaza merged commit 956900b into 3.x.x Jul 3, 2023
@kpicaza kpicaza deleted the v2.0 branch July 3, 2023 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Add or update documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant