sfContext::getDatabaseConnection PHP 메소드

getDatabaseConnection() 공개 메소드

This is a shortcut to manually getting a connection from an existing database implementation instance. If the [sf_use_database] setting is off, this will return null.
public getDatabaseConnection ( name $name = 'default' ) : mixed
$name name A database name.
리턴 mixed A database instance.
    public function getDatabaseConnection($name = 'default')
    {
        if (null !== $this->factories['databaseManager']) {
            return $this->factories['databaseManager']->getDatabase($name)->getConnection();
        }
        return null;
    }