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
Raw Normal View History

<?php
/**
* OpenSQLManager
*
* Free Database manager for Open Source Databases
*
2012-04-20 13:30:27 -04:00
* @package OpenSQLManager
* @author Timothy J. Warren
* @copyright Copyright (c) 2012
* @link https://github.com/aviat4ion/OpenSQLManager
2012-03-28 09:57:57 -04:00
* @license http://philsturgeon.co.uk/code/dbad-license
*/
// --------------------------------------------------------------------------
2012-05-29 14:29:20 -04:00
namespace OpenSQLManager;
2012-03-28 09:57:57 -04:00
/**
* Widget managing saved database connections
2012-04-20 13:30:27 -04:00
*
* @package OpenSQLManager
* @subpackage Widgets
2012-03-28 09:57:57 -04:00
*/
2012-05-29 14:29:20 -04:00
class Connection_Sidebar extends \wxWindow {
2012-04-19 12:29:47 -04:00
/**
* Reference to Settings instance
2012-04-19 21:55:44 -04:00
*
* @var Settings
2012-04-19 12:29:47 -04:00
*/
protected $settings;
/**
* Reference to popup menu
2012-04-19 21:55:44 -04:00
*
* @var GtkMenu
2012-04-19 12:29:47 -04:00
*/
protected $menu;
/**
* Treeview for displaying connections
2012-04-19 21:55:44 -04:00
*
* @var GtkTreeView
2012-04-19 12:29:47 -04:00
*/
protected $treeview;
/**
* Singleton instance
2012-04-19 21:55:44 -04:00
*
* @var Connection_Sidebar
2012-04-19 12:29:47 -04:00
*/
2012-02-28 10:38:13 -05:00
private static $instance;
2012-04-19 12:29:47 -04:00
/**
* Name of current db connection
2012-04-19 21:55:44 -04:00
*
* @var string
2012-04-19 12:29:47 -04:00
*/
2012-04-10 15:42:12 -04:00
private $conn_name;
2012-02-24 17:53:16 -05:00
2012-03-26 12:55:52 -04:00
/**
* Return the current instance of the class
*
* @return Connection_Sidebar
*/
2012-02-28 10:38:13 -05:00
public static function &get_instance()
{
if( ! isset(self::$instance))
{
$name = __CLASS__;
self::$instance = new $name();
}
return self::$instance;
}
2012-03-26 12:55:52 -04:00
// --------------------------------------------------------------------------
2012-02-28 10:38:13 -05:00
/**
* Constructor method
*/
public function __construct()
{
parent::__construct();
2012-05-29 14:29:20 -04:00
$this->settings =& \Settings::get_instance();
}
2012-03-26 12:55:52 -04:00
// --------------------------------------------------------------------------
2012-02-28 10:38:13 -05:00
/**
* Renders the connection sidebar widget
2012-04-11 14:57:38 -04:00
*
* @return void
2012-02-28 10:38:13 -05:00
*/
protected function _render()
{
2012-04-10 15:42:12 -04:00
}
}
2012-05-29 14:29:20 -04:00
2012-05-14 13:25:32 -04:00
// End of connection_sidebar.php