PHP code example of onlinesid / silex-sphinx-provider

1. Go to this page and download the library: Download onlinesid/silex-sphinx-provider library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

onlinesid / silex-sphinx-provider example snippets


$app->register(new OnlineSid\Silex\Provider\Search\SphinxServiceProvider(), array(
    'sphinx_options' => array('host' => '127.0.0.1', 'port' => '9312'),
));

/** @var $sphinxSearch \NilPortugues\Sphinx\SphinxClient */
$sphinxSearch = $this->app['sphinx_client'];