phpBB API Documentation
Class

phpbb\search\sphinx\config_section

class config_section

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

Methods

__construct($name, $comment)

Construct a new section

add_variable($variable)

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

set_end_comment($end_comment)

Adds a comment after the closing bracket in the textual representation

get_name()

Getter for the name of this section

get_variable_by_name($name)

Get a variable object by its name

delete_variables_by_name($name)

Deletes all variables with the given name

create_variable($name, $value)

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

to_string()

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

Details

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

Construct a new section

Parameters

$name
$comment

at line 50
public add_variable($variable)

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

Parameters

$variable

at line 62
public set_end_comment($end_comment)

Adds a comment after the closing bracket in the textual representation

Parameters

$end_comment

at line 74
public get_name()

Getter for the name of this section

at line 88
public get_variable_by_name($name)

Get a variable object by its name

Parameters

$name

at line 107
public delete_variables_by_name($name)

Deletes all variables with the given name

Parameters

$name

at line 129
public create_variable($name, $value)

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

Parameters

$name
$value

at line 142
public to_string()

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