mirror of
https://github.com/silverstripe/silverstripe-fulltextsearch
synced 2024-10-22 14:05:29 +02:00
DOCS Add doc blocks for ProxyDBExtension
This commit is contained in:
parent
e7420a584d
commit
08052436e8
@ -6,8 +6,21 @@ use SilverStripe\Core\Extension;
|
||||
use TractorCow\ClassProxy\Generators\ProxyGenerator;
|
||||
use SilverStripe\FullTextSearch\Search\Updaters\SearchUpdater;
|
||||
|
||||
/**
|
||||
* Class ProxyDBExtension
|
||||
* @package SilverStripe\FullTextSearch\Search\Extensions
|
||||
*
|
||||
* This database connector proxy will allow {@link SearchUpdater::handle_manipulation} to monitor database schema
|
||||
* changes that may need to be propagated through to search indexes.
|
||||
*
|
||||
*/
|
||||
class ProxyDBExtension extends Extension
|
||||
{
|
||||
/**
|
||||
* @param ProxyGenerator $proxy
|
||||
*
|
||||
* Ensure the search index is kept up to date by monitoring SilverStripe database manipulations
|
||||
*/
|
||||
public function updateProxy(ProxyGenerator &$proxy)
|
||||
{
|
||||
$proxy = $proxy->addMethod('manipulate', function ($args, $next) {
|
||||
|
@ -42,7 +42,7 @@ class SearchUpdater
|
||||
public static $processor = null;
|
||||
|
||||
/**
|
||||
* Called by the SearchManiplateCapture database adapter with every manipulation made against the database.
|
||||
* Called by the ProxyDBExtension database connector with every manipulation made against the database.
|
||||
*
|
||||
* Check every index to see what objects need re-inserting into what indexes to keep the index fresh,
|
||||
* but doesn't actually do it yet.
|
||||
|
Loading…
Reference in New Issue
Block a user