3 final class PhabricatorSearchNgramsDestructionEngineExtension
4 extends PhabricatorDestructionEngineExtension
{
6 const EXTENSIONKEY
= 'search.ngrams';
8 public function getExtensionName() {
9 return pht('Search Ngram');
12 public function canDestroyObject(
13 PhabricatorDestructionEngine
$engine,
15 return ($object instanceof PhabricatorNgramsInterface
);
18 public function destroyObject(
19 PhabricatorDestructionEngine
$engine,
22 foreach ($object->newNgrams() as $ngram) {
24 $ngram->establishConnection('w'),
25 'DELETE FROM %T WHERE objectID = %d',
26 $ngram->getTableName(),