Configuration¶
Obtaining a Connection¶
You can obtain a SphinxQL Connection with the Foolz\SphinxQL\Drivers\Mysqli\Connection class.
<?php
use Foolz\SphinxQL\Drivers\Mysqli\Connection;
$conn = new Connection();
$conn->setparams(array('host' => '127.0.0.1', 'port' => 9306));
Warning
The existing PDO driver written is considered experimental as the behaviour changes between certain PHP releases.
Connection Parameters¶
The connection parameters provide information about the instance you wish to establish a connection with. The parameters required is set with the setParams($array) or setParam($key, $value) methods.
host
Type: string Default: 127.0.0.1
port
Type: int Default: 9306
socket
Type: string Default: null
options
Type: array Default: null