This repository has been archived on 2018-10-12. You can view files and clone it, but cannot push or open issues or pull requests.
OpenSQLManager/sys/widgets/connection_sidebar.php

102 lines
1.7 KiB
PHP

<?php
/**
* OpenSQLManager
*
* Free Database manager for Open Source Databases
*
* @package OpenSQLManager
* @author Timothy J. Warren
* @copyright Copyright (c) 2012
* @link https://github.com/aviat4ion/OpenSQLManager
* @license http://philsturgeon.co.uk/code/dbad-license
*/
// --------------------------------------------------------------------------
namespace OpenSQLManager;
/**
* Widget managing saved database connections
*
* @package OpenSQLManager
* @subpackage Widgets
*/
class Connection_Sidebar extends \wxWindow {
/**
* Reference to Settings instance
*
* @var Settings
*/
protected $settings;
/**
* Reference to popup menu
*
* @var GtkMenu
*/
protected $menu;
/**
* Treeview for displaying connections
*
* @var GtkTreeView
*/
protected $treeview;
/**
* Singleton instance
*
* @var Connection_Sidebar
*/
private static $instance;
/**
* Name of current db connection
*
* @var string
*/
private $conn_name;
/**
* Return the current instance of the class
*
* @return Connection_Sidebar
*/
public static function &get_instance()
{
if( ! isset(self::$instance))
{
$name = __CLASS__;
self::$instance = new $name();
}
return self::$instance;
}
// --------------------------------------------------------------------------
/**
* Constructor method
*/
public function __construct()
{
parent::__construct();
$this->settings =& \Settings::get_instance();
}
// --------------------------------------------------------------------------
/**
* Renders the connection sidebar widget
*
* @return void
*/
protected function _render()
{
}
}
// End of connection_sidebar.php