Exemplo n.º 1
0
 /**
  * {@inheritdoc}
  */
 protected function getConnection(&$profile = null, $initialize = false, array $parameters = array())
 {
     $parameters = $this->getParameters($parameters);
     $profile = $this->getProfile();
     $connection = new StreamConnection($parameters);
     if ($initialize) {
         $connection->pushInitCommand($profile->createCommand('select', array($parameters->database)));
         $connection->pushInitCommand($profile->createCommand('flushdb'));
     }
     return $connection;
 }