Пример #1
0
 public static function getFactory()
 {
     if (!self::$factory) {
         self::$factory = new ConnectionFactory();
     }
     return self::$factory;
 }
 /**
  * Searches for the configuration for the connection and creates it. If the configuration is not found then it will
  * return NULL
  *
  * @param string $name
  * @return null|\PDO
  */
 protected function createConnection($name)
 {
     if (!isset($this->config[$name]['pdo'])) {
         return null;
     }
     return ConnectionFactory::factory($this->config[$name]['pdo']);
 }