PHP code example of karelwintersky / arris.toolkit.sphinxql-foolz-wrapper

1. Go to this page and download the library: Download karelwintersky/arris.toolkit.sphinxql-foolz-wrapper 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/ */

    

karelwintersky / arris.toolkit.sphinxql-foolz-wrapper example snippets


$dataset = [
    'id'            =>  $id,
    'title'         =>  $item['title'],
    'short'         =>  $item['short'],
    'text'          =>  $item['text_bb'],

    'date_added'    =>  date_format( date_create_from_format('Y-m-d H:i:s', $item['cdate']), 'U' ),

    'type'          =>  1,
    'photo'         =>  empty($article['photo']['file']) ? 0 : 1,
    'author'        =>  $item['author'],

    // @todo: REQURED SphinxDynoConf :: MVA Attributes in RT_ARTICLES index
    'districts_all' =>  $item['districts_all'],
    'rubrics'       =>  array_keys($item['rubrics']),
    'districts'     =>  array_keys($item['districts'])
];
rt_ReplaceIndex('rt_articles', $dataset);