Bug: Live query chart always zero
[phpmyadmin/tyronm.git] / libraries / PMA.php
blobea2c27e8d2a6dcbe22b078eb08d779f3eea32b1c
1 <?php
2 /**
3 * Enter description here...
4 * @package phpMyAdmin
6 */
8 /**
9 * Database listing.
11 require_once './libraries/List_Database.class.php';
13 /**
14 * phpMyAdmin main Controller
18 * @package phpMyAdmin
20 class PMA
22 /**
23 * Holds database list
25 * @var PMA_List_Database
27 protected $databases = null;
29 /**
30 * DBMS user link
32 * @var resource
34 protected $userlink = null;
36 /**
37 * DBMS control link
39 * @var resource
41 protected $controllink = null;
43 /**
44 * magic access to protected/inaccessible members/properties
46 * @see http://php.net/language.oop5.overloading
48 * @param string $param
49 * @return mixed
51 public function __get($param)
53 switch ($param) {
54 case 'databases' :
55 return $this->getDatabaseList();
56 break;
57 case 'userlink' :
58 return $this->userlink;
59 break;
60 case 'controllink' :
61 return $this->controllink;
62 break;
65 return null;
68 /**
69 * magic access to protected/inaccessible members/properties
71 * @see http://php.net/language.oop5.overloading
73 * @param string $param
74 * @param mixed $value
76 public function __set($param, $value)
78 switch ($param) {
79 case 'userlink' :
80 $this->userlink = $value;
81 break;
82 case 'controllink' :
83 $this->controllink = $value;
84 break;
88 /**
89 * Accessor to PMA::$databases
91 * @return PMA_List_Databases
93 public function getDatabaseList()
95 if (null === $this->databases) {
96 $this->databases = new PMA_List_Database($this->userlink, $this->controllink);
99 return $this->databases;