bug #4046 Exporting huge Tables causes memory-Problems
[phpmyadmin.git] / libraries / PMA.php
blob021917d374136c14cd3ab963575c45e2f55da877
1 <?php
2 /* vim: set expandtab sw=4 ts=4 sts=4: */
3 /**
4 * phpMyAdmin main Controller
6 * @package PhpMyAdmin
8 */
10 if (! defined('PHPMYADMIN')) {
11 exit;
14 /**
15 * Database listing.
17 require_once './libraries/List_Database.class.php';
19 /**
20 * phpMyAdmin main Controller
22 * @package PhpMyAdmin
24 class PMA
26 /**
27 * Holds database list
29 * @var PMA_List_Database
31 protected $databases = null;
33 /**
34 * DBMS user link
36 * @var resource
38 protected $userlink = null;
40 /**
41 * DBMS control link
43 * @var resource
45 protected $controllink = null;
47 /**
48 * magic access to protected/inaccessible members/properties
50 * @param string $param parameter name
52 * @return mixed
53 * @see http://php.net/language.oop5.overloading
55 public function __get($param)
57 switch ($param) {
58 case 'databases' :
59 return $this->getDatabaseList();
60 break;
61 case 'userlink' :
62 return $this->userlink;
63 break;
64 case 'controllink' :
65 return $this->controllink;
66 break;
69 return null;
72 /**
73 * magic access to protected/inaccessible members/properties
75 * @param string $param parameter name
76 * @param mixed $value value to set
78 * @return void
79 * @see http://php.net/language.oop5.overloading
81 public function __set($param, $value)
83 switch ($param) {
84 case 'userlink' :
85 $this->userlink = $value;
86 break;
87 case 'controllink' :
88 $this->controllink = $value;
89 break;
93 /**
94 * Accessor to PMA::$databases
96 * @return PMA_List_Databases
98 public function getDatabaseList()
100 if (null === $this->databases) {
101 $this->databases = new PMA_List_Database(
102 $this->userlink,
103 $this->controllink
107 return $this->databases;