Checks

From Sunhill Framework Documentation
Revision as of 16:59, 30 August 2024 by Klaus (talk | contribs) (Created page with "Checks are an unified way to perform sanity checks on the installed system. Initially developed to check if the database tables are consistent you can check all kinds of sanity. == The check command == The framework defines a artisan command called <code>check</code>. It is called via <code>./artisan check</code> ''Note that you have to replace <code>artisan</code> with the name of your artisan application.'' The check command has one <!-- two -->parameter<!--s-->: <...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Checks are an unified way to perform sanity checks on the installed system. Initially developed to check if the database tables are consistent you can check all kinds of sanity.

The check command

The framework defines a artisan command called check. It is called via

./artisan check

Note that you have to replace artisan with the name of your artisan application.

The check command has one parameter:

./artisan check --repair 

This tells the check not just to report an inconsistency but also to try to repair it.

Writing own checks

To write your own check just create a class with Sunhill\Basic\Checker\Checker as ancestor.

<?php
use Sunhill\Basic\Checker\Checker;

class MyCheck extends Checker
{
...
}