/** * @param \Symfony\Component\DependencyInjection\ContainerInterface $container * @return DatabaseManagementInterface */ public static function createRAMServer(ContainerInterface $container) { list($mysqldBin) = Shell::run("which mysqld"); $server = new MySQLRAMServer(); $server->setRamDisk($container->get('ram_disk')); $server->setMySQLRamServerPort($container->getParameter('mysql_ram_server_port')); $server->setDefaultDataFiles(self::findDataFiles($mysqldBin)); if (file_exists("/etc/apparmor.d")) { $server->setAppArmor($container->get('app_armor.mysql_ram_disk')); } return $server; }
public function runCommand($command, $options = array()) { $options['print_command'] = TRUE; return \Amp\Util\Shell::run($command); }