Doctrine\DBAL\Connection::getPort PHP Method

getPort() public method

Gets the port of the currently connected database.
public getPort ( ) : mixed
return mixed
    public function getPort()
    {
        return isset($this->_params['port']) ? $this->_params['port'] : null;
    }

Usage Example

Ejemplo n.º 1
0
 /**
  * @return string
  */
 public function getPanel()
 {
     if (empty($this->queries)) {
         return '';
     }
     return $this->renderStyles() . sprintf('<h1>Queries: %s %s, host: %s</h1>', count($this->queries), $this->totalTime ? ', time: ' . sprintf('%0.3f', $this->totalTime * 1000) . ' ms' : '', sprintf('%s%s/%s', $this->connection->getHost(), ($p = $this->connection->getPort()) ? ':' . $p : '', $this->connection->getDatabase())) . '<div class="nette-inner tracy-inner nette-Doctrine2Panel">' . implode('<br>', array_filter(array($this->renderPanelCacheStatistics(), $this->renderPanelQueries()))) . '</div>';
 }
All Usage Examples Of Doctrine\DBAL\Connection::getPort