PHP code example of wy / neos-oh-dear

1. Go to this page and download the library: Download wy/neos-oh-dear library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

wy / neos-oh-dear example snippets



use \Wysiwyg\OhDear\Checks;

$composerAutoloader = er);

/** @var array<int, \Wysiwyg\OhDear\Checks\Check> $checks */
$checks = [
    new Checks\DiskSpaceCheck(),
    new Checks\CpuLoadCheck(),
    new Checks\DatabaseCheck(
        'mysql',
        $app->getNeosConfig('Neos.Flow.persistence.backendOptions.host'),
        $app->getNeosConfig('Neos.Flow.persistence.backendOptions.user'),
        $app->getNeosConfig('Neos.Flow.persistence.backendOptions.password'),
        $app->getNeosConfig('Neos.Flow.persistence.backendOptions.dbname')
    ),
    new Checks\RedisCheck(
        $app->getNeosConfig('Neos_Fusion_Content.backendOptions.hostname', 'Caches'),
        $app->getNeosConfig('Neos_Fusion_Content.backendOptions.password', 'Caches'),
        $app->getNeosConfig('Neos_Fusion_Content.backendOptions.database', 'Caches'),
        (int) $app->getNeosConfig('Neos_Fusion_Content.backendOptions.port', 'Caches')
    ),
    new Checks\SwiftSmtpCheck(
        $app->getNeosConfig('Neos.SwiftMailer.transport.options.host'),
        $app->getNeosConfig('Neos.SwiftMailer.transport.options.encryption'),
        $app->getNeosConfig('Neos.SwiftMailer.transport.options.port'),
        $app->getNeosConfig('Neos.SwiftMailer.transport.options.user'),
        $app->getNeosConfig('Neos.SwiftMailer.transport.options.password'),
        $app->getNeosConfig('Neos.SwiftMailer.transport.options.streamOptions'),
    ),
];

$app->process($checks);