/**
  * Attempts to start a SQL console.
  */
 public function startConsole()
 {
     // Get the details for the current database.
     $cmd = $this->getDatabaseCommand();
     // Run the console.
     SakeMoreHelper::runCLI($cmd);
 }
 /**
  * Attempts to start a PHP console.
  */
 public function startConsole()
 {
     // Prepare variables.
     $sakebase = dirname(dirname(__DIR__));
     $sitebase = dirname($sakebase);
     // Find the PHPSH script.
     $path = $sakebase . '/thirdparty/phpsh/phpsh';
     // Run this helper script to initialise Silverstripe.
     $arg = sprintf('%s/scripts/consolerole-init.php', $sakebase);
     // Run the console.
     $cmd = $path . ' ' . $arg;
     SakeMoreHelper::runCLI($cmd);
 }