22 lines
473 B
PHP
22 lines
473 B
PHP
|
<?php
|
||
|
|
||
|
declare(strict_types=1);
|
||
|
|
||
|
namespace DigiComp\FlowMaintenanceMode;
|
||
|
|
||
|
use Neos\Flow\Annotations as Flow;
|
||
|
|
||
|
class DistributionFileMaintenanceModeManager implements MaintenanceModeManagerInterface
|
||
|
{
|
||
|
#[Flow\InjectConfiguration(path: 'maintenanceManager.pathToCheck')]
|
||
|
protected string $pathToCheck;
|
||
|
|
||
|
public function isMaintenanceMode(): bool
|
||
|
{
|
||
|
if (\file_exists($this->pathToCheck)) {
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
}
|