class config_section

\phpbb\search\sphinx\config_section Represents a single section inside the sphinx configuration

Methods

__construct(string $name, string $comment)

Construct a new section

add_variable(config_variable $variable)

Add a variable object to the list of variables in this section

set_end_comment(string $end_comment)

Adds a comment after the closing bracket in the textual representation

string
get_name()

Getter for the name of this section

get_variable_by_name(string $name)

Get a variable object by its name

delete_variables_by_name(string $name)

Deletes all variables with the given name

create_variable(string $name, string $value)

Create a new variable object and append it to the variable list of this section

string
to_string()

Turns this object into a string which can be written to a config file

Details

at line 36
__construct(string $name, string $comment)

Construct a new section

Parameters

string $name

Name of the section

string $comment

Comment that should be appended after the name in the textual format.

at line 50
add_variable(config_variable $variable)

Add a variable object to the list of variables in this section

Parameters

config_variable $variable

The variable object

at line 62
set_end_comment(string $end_comment)

Adds a comment after the closing bracket in the textual representation

Parameters

string $end_comment

at line 74
string get_name()

Getter for the name of this section

Return Value

string

Section's name

at line 88
config_section get_variable_by_name(string $name)

Get a variable object by its name

Parameters

string $name

The name of the variable that shall be returned

Return Value

config_section

The first variable object from this section with the given name or null if none was found

at line 107
delete_variables_by_name(string $name)

Deletes all variables with the given name

Parameters

string $name

The name of the variable objects that are supposed to be removed

at line 129
config_variable create_variable(string $name, string $value)

Create a new variable object and append it to the variable list of this section

Parameters

string $name

The name for the new variable

string $value

The value for the new variable

Return Value

config_variable

Variable object that was created

at line 142
string to_string()

Turns this object into a string which can be written to a config file

Return Value

string

Config data in textual form, parsable for sphinx