1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-07-25 02:51:35 +02:00

[feature/sphinx-fulltext-search] Make different files for different classes

Break the classes in functions-sphinx.php into different files
with proper class names according to phpbb class auto loader conventions.

PHPBB3-10946

Conflicts:

	phpBB/includes/search/sphinx/config.php
This commit is contained in:
Dhruv Goel
2012-07-01 01:23:57 +05:30
committed by Dhruv
parent 10b706674e
commit 97fda78e7d
5 changed files with 280 additions and 239 deletions

View File

@@ -0,0 +1,72 @@
<?php
/**
*
* @package search
* @copyright (c) 2005 phpBB Group
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2
*
*/
/**
* @ignore
*/
if (!defined('IN_PHPBB'))
{
exit;
}
/**
* phpbb_search_sphinx_config_variable
* Represents a single variable inside the sphinx configuration
*/
class phpbb_search_sphinx_config_variable
{
var $name;
var $value;
var $comment;
/**
* Constructs a new variable object
*
* @param string $name Name of the variable
* @param string $value Value of the variable
* @param string $comment Optional comment after the variable in the
* config file
*/
function __construct($name, $value, $comment)
{
$this->name = $name;
$this->value = $value;
$this->comment = $comment;
}
/**
* Getter for the variable's name
*
* @return string The variable object's name
*/
function get_name()
{
return $this->name;
}
/**
* Allows changing the variable's value
*
* @param string $value New value for this variable
*/
function set_value($value)
{
$this->value = $value;
}
/**
* Turns this object into a string readable by sphinx
*
* @return string Config data in textual form
*/
function to_string()
{
return "\t" . $this->name . ' = ' . str_replace("\n", "\\\n", $this->value) . ' ' . $this->comment . "\n";
}
}