class md_exporter

Crawls through a markdown file and grabs all events

Properties

protected string $path
protected string $root_path
protected string $min_version
protected string $max_version
protected string $filter
protected string $current_event
protected array $events

Methods

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

No description

array
get_events()

Get the list of all events

int
crawl_phpbb_directory_adm(string $md_file)

No description

int
crawl_phpbb_directory_styles(string $md_file)

No description

int
crawl_eventsmd(string $md_file, string $filter)

No description

bool
version_is_filtered(string $version)

The version to check

string
export_events_for_wiki(string $action = '') deprecated

Format the md events as a wiki table

string
export_events_for_rst(string $action = '')

Format the md events as a rst table

string
export_events_for_bbcode(string $action = '')

Format the md events as BBCode list

null
validate_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

array
get_recursive_file_list(string $dir)

Returns a list of files in $dir

Details

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

No description

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
array get_events()

Get the list of all events

Return Value

array

Array with events: name => details

at line 79
int crawl_phpbb_directory_adm(string $md_file)

No description

Parameters

string $md_file

Relative from phpBB root

Return Value

int

Number of events found

Exceptions

LogicException

at line 98
int crawl_phpbb_directory_styles(string $md_file)

No description

Parameters

string $md_file

Relative from phpBB root

Return Value

int

Number of events found

Exceptions

LogicException

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

No description

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 239
protected bool version_is_filtered(string $version)

The version to check

Parameters

string $version

Return Value

bool

at line 252
string export_events_for_wiki(string $action = '') deprecated

deprecated 3.3.5-RC1 (To be removed: 4.0.0-a1)

Format the md events as a wiki table

Parameters

string $action

Return Value

string

Number of events found * @deprecated since 3.2

at line 308
string export_events_for_rst(string $action = '')

Format the md events as a rst table

Parameters

string $action

Return Value

string

Number of events found

at line 373
string export_events_for_bbcode(string $action = '')

Format the md events as BBCode list

Parameters

string $action

Return Value

string

Events BBCode

at line 432
null validate_event_name($event_name)

Validates a template event name

Parameters

$event_name

Return Value

null

Exceptions

LogicException

at line 447
string validate_since(string $since)

Validate "Since" Information

Parameters

string $since

Return Value

string

Exceptions

LogicException

at line 464
string validate_changed(string $changed)

Validate "Changed" Information

Parameters

string $changed

Return Value

string

Exceptions

LogicException

at line 490
bool validate_version(string $version)

Validate "version" Information

Parameters

string $version

Return Value

bool

True if valid, false otherwise

at line 502
array validate_file_list(string $file_details)

Validate the files list

Parameters

string $file_details

Return Value

array

Exceptions

LogicException

at line 571
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 594
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 654
array get_recursive_file_list(string $dir)

Returns a list of files in $dir

Works recursive with any depth

Parameters

string $dir

Directory to go through

Return Value

array

List of files (including directories)