Skip to content

Commit

Permalink
docs(readme): updated readme
Browse files Browse the repository at this point in the history
  • Loading branch information
buggyzap committed Oct 10, 2023
1 parent 6761478 commit 24bb6fe
Showing 1 changed file with 33 additions and 24 deletions.
57 changes: 33 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
# Check the key validity
# Ector Checker

[![Latest Version on Packagist](https://img.shields.io/packagist/v/ector/ector-checker.svg?style=flat-square)](https://packagist.org/packages/ector/ector-checker)
[![Tests](https://img.shields.io/github/actions/workflow/status/ector/ector-checker/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/ector/ector-checker/actions/workflows/run-tests.yml)
[![Total Downloads](https://img.shields.io/packagist/dt/ector/ector-checker.svg?style=flat-square)](https://packagist.org/packages/ector/ector-checker)
[![Latest Version on Packagist](https://img.shields.io/packagist/v/ector/checker.svg?style=flat-square)](https://packagist.org/packages/ector/checker)
[![Tests](https://img.shields.io/github/actions/workflow/status/ector/checker/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/buggyzap/ector_checker/actions/workflows/run-tests.yml)
[![Total Downloads](https://img.shields.io/packagist/dt/ector/checker.svg?style=flat-square)](https://packagist.org/packages/ector/checker)

This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example.

## Support us

[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/ector_checker.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/ector_checker)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
Composer dependency to check if a Ector instance is valid.

## Installation

Expand All @@ -24,9 +16,35 @@ composer require ector/ector-checker

## Usage


### Setup class as a symfony service

```yaml
# config/admin/services.yml
services:
_defaults:
public: true

ector.checker:
class: 'Ector\Checker\Checker'
```

### Inject the Ector/Checker via symfony container in module __construct

```php
if ($this->checker === null && $this->context->controller instanceof AdminController) {
$this->checker = $this->get("ector.checker");
}
```

### Run the healtcheck in right hook

```php
$skeleton = new Checker\EctorChecker();
echo $skeleton->echoPhrase('Hello, Checker!');
public function hookActionAdminControllerInitAfter($params)
{
$controller = $params["controller"];
$this->checker->healthCheck($controller);
}
```

## Testing
Expand All @@ -39,18 +57,9 @@ composer test

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

## Contributing

Please see [CONTRIBUTING](https://github.com/spatie/.github/blob/main/CONTRIBUTING.md) for details.

## Security Vulnerabilities

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

## Credits

- [DGCAL SRL](https://github.com/buggyzap)
- [All Contributors](../../contributors)

## License

Expand Down

0 comments on commit 24bb6fe

Please sign in to comment.