Changeset View
Changeset View
Standalone View
Standalone View
src/infrastructure/cluster/search/PhabricatorMySQLSearchHost.php
- This file was added.
<?php | |||||
final class PhabricatorMySQLSearchHost | |||||
extends PhabricatorSearchHost { | |||||
private $engine; | |||||
public function __construct() { | |||||
$this->engine = new PhabricatorMySQLFulltextStorageEngine(); | |||||
} | |||||
public function setConfig($config) { | |||||
$this->setRoles(idx($config, 'roles', | |||||
array('read' => true, 'write' => true))); | |||||
return $this; | |||||
} | |||||
public function getDisplayName() { | |||||
return 'MySQL'; | |||||
} | |||||
public function getEngineIdentifier() { | |||||
return 'mysql'; | |||||
} | |||||
public function getEngine() { | |||||
return $this->engine; | |||||
} | |||||
public function getProtocol() { | |||||
return 'mysql'; | |||||
} | |||||
public function getConnectionStatus() { | |||||
PhabricatorDatabaseRef::queryAll(); | |||||
$ref = PhabricatorDatabaseRef::getMasterDatabaseRefForApplication('search'); | |||||
$status = $ref->getConnectionStatus(); | |||||
return $status; | |||||
} | |||||
} |