Skip to content

buggyzap/ector_checker

Repository files navigation

Ector Checker

Latest Version on Packagist Tests Total Downloads

Composer dependency to check if a Ector instance is valid.

Installation

You can install the package via composer:

composer require ector/checker

Usage

Setup class as a symfony service

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

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

Inject the Ector/Checker via symfony container in module __construct

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

Run the healtcheck in right hook

public function hookActionAdminControllerInitAfter($params)
{
    $controller = $params["controller"];
    $this->checker->healthCheck($controller);
}

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits

License

The MIT License (MIT). Please see License File for more information.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Sponsor this project

Packages

No packages published