phpBB API Documentation
Class

phpbb\event\md_exporter

class md_exporter

Crawls through a markdown file and grabs all events

Methods

__construct(string $phpbb_root_path, mixed $extension = null, string $min_version = null, string $max_version = null)

array get_events()

Get the list of all events

int crawl_phpbb_directory_adm(string $md_file)

int crawl_phpbb_directory_styles(string $md_file)

int crawl_eventsmd(string $md_file, string $filter)

string export_events_for_wiki(string $action = '')

Format the php events as a wiki table

null validate_event_name($event_name $event_name)

Validates a template event name

string validate_since(string $since)

Validate "Since" Information

string validate_changed(string $changed)

Validate "Changed" Information

bool validate_version(string $version)

Validate "version" Information

array validate_file_list(string $file_details)

Validate the files list

array crawl_file_for_events(string $file)

Get all template events in a template file

true validate_events_from_file(string $file, array $events)

Validates whether all events from $file are in the md file and vice-versa

get_recursive_file_list($dir)

Returns a list of files in $dir

Details

at line 48
public __construct(string $phpbb_root_path, mixed $extension = null, string $min_version = null, string $max_version = null)

Parameters

string $phpbb_root_path
mixed $extension String 'vendor/ext' to filter, null for phpBB core
string $min_version
string $max_version

at line 69
public array get_events()

Get the list of all events

Return Value

array Array with events: name => details

at line 79
public int crawl_phpbb_directory_adm(string $md_file)

Parameters

string $md_file Relative from phpBB root

Return Value

int Number of events found

Exceptions

LogicException

at line 98
public int crawl_phpbb_directory_styles(string $md_file)

Parameters

string $md_file Relative from phpBB root

Return Value

int Number of events found

Exceptions

LogicException

at line 125
public int crawl_eventsmd(string $md_file, string $filter)

Parameters

string $md_file Relative from phpBB root
string $filter Should be 'styles' or 'adm'

Return Value

int Number of events found

Exceptions

LogicException

at line 243
public string export_events_for_wiki(string $action = '')

Format the php events as a wiki table

Parameters

string $action

Return Value

string Number of events found

at line 300
public null validate_event_name($event_name $event_name)

Validates a template event name

Parameters

$event_name $event_name

Return Value

null

Exceptions

LogicException

at line 315
public string validate_since(string $since)

Validate "Since" Information

Parameters

string $since

Return Value

string

Exceptions

LogicException

at line 332
public string validate_changed(string $changed)

Validate "Changed" Information

Parameters

string $changed

Return Value

string

Exceptions

LogicException

at line 358
public bool validate_version(string $version)

Validate "version" Information

Parameters

string $version

Return Value

bool True if valid, false otherwise

at line 370
public array validate_file_list(string $file_details)

Validate the files list

Parameters

string $file_details

Return Value

array

Exceptions

LogicException

at line 432
public array crawl_file_for_events(string $file)

Get all template events in a template file

Parameters

string $file

Return Value

array

Exceptions

LogicException

at line 462
public true validate_events_from_file(string $file, array $events)

Validates whether all events from $file are in the md file and vice-versa

Parameters

string $file
array $events

Return Value

true

Exceptions

LogicException

at line 522
public get_recursive_file_list($dir)

Returns a list of files in $dir

Works recursive with any depth

Parameters

$dir