class check_filesystem extends task_base

Checks filesystem requirements

Properties

protected bool $is_essential from  task_base
protected filesystem_interface $filesystem
protected array $files_to_check
protected bool $tests_passed
protected string $phpbb_root_path
protected iohandler_interface $response

Methods

__construct(filesystem_interface $filesystem, iohandler_interface $response, string $phpbb_root_path, string $php_ext, bool $check_config_php = true)

Constructor

bool
is_essential()

Checks if the task is essential to install phpBB or it can be skipped

bool
check_requirements()

Checks requirements for the tasks

run()

Executes the task

set_test_passed(bool $is_passed)

Sets $this->tests_passed

check_file(string $file, bool $failable = false)

Check if a file is readable and writable

check_dir(string $dir, bool $failable = false)

Check if a directory is readable and writable

static int
get_step_count()

Returns the number of steps the task contains

string
get_task_lang_name()

Returns the language key of the name of the task

Details

at line 55
__construct(filesystem_interface $filesystem, iohandler_interface $response, string $phpbb_root_path, string $php_ext, bool $check_config_php = true)

Constructor

Parameters

filesystem_interface $filesystem

filesystem handler

iohandler_interface $response

response helper

string $phpbb_root_path

relative path to phpBB's root

string $php_ext

extension of php files

bool $check_config_php

Whether or not to check if config.php is writable

in task_base at line 39
bool is_essential()

Checks if the task is essential to install phpBB or it can be skipped

Note: Please note that all the non-essential modules have to implement check_requirements() method.

Return Value

bool

true if the task is essential, false otherwise

in task_base at line 49
bool check_requirements()

Checks requirements for the tasks

Note: Only need to be implemented for non-essential tasks, as essential tasks requirements should be checked in the requirements install module.

Return Value

bool

true if the task's requirements are met

at line 103
run()

Executes the task

at line 128
protected set_test_passed(bool $is_passed)

Sets $this->tests_passed

Parameters

bool $is_passed

at line 140
protected check_file(string $file, bool $failable = false)

Check if a file is readable and writable

Parameters

string $file

Filename

bool $failable

Whether failing test should interrupt installation process

at line 201
protected check_dir(string $dir, bool $failable = false)

Check if a directory is readable and writable

Parameters

string $dir

Filename

bool $failable

Whether failing test should abort the installation process

at line 267
static int get_step_count()

Returns the number of steps the task contains

This is a helper method to provide a better progress bar for the front-end.

Return Value

int

The number of steps that the task contains

at line 275
string get_task_lang_name()

Returns the language key of the name of the task

Return Value

string