public function getWriteConnection(AdapterInterface $adapter = null)
    {
        if (null === $this->writeConnection) {
            $this->writeConnection = ConnectionFactory::create($this->writeConfiguration, $adapter);
            $this->writeConnection->setName($this->getName());
        }

        return $this->writeConnection;
    }
public function getWriteConnection(AdapterInterface $adapter = null)
    {
        if (null === $this->writeConnection) {
            $this->writeConnection = ConnectionFactory::create($this->writeConfiguration, $adapter);
            $this->writeConnection->setName($this->getName());
        }

        return $this->writeConnection;
    }
public function getWriteConnection ( AdapterInterface $ adapter = null ) { if ( null === $ this -> writeConnection ) { $ this -> writeConnection = ConnectionFactory :: create ( $ this -> writeConfiguration , $ adapter ) ; $ this -> writeConnection -> setName ( $ this -> getName ( ) ) ; } return $ this -> writeConnection ; }
Get a master connection.

If no master connection exist yet, open it using the write configuration.

@param \Propel\Runtime\Adapter\AdapterInterface $adapter

@return \Propel\Runtime\Connection\ConnectionInterface
Get a master connection .