added japanese language
[openemr.git] / phpmyadmin / libraries / PMA.php
blobf01b9cac78b9f4ef033791a09704ab5fc2d5853c
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
23 * @property resource $userlink
24 * @property resource $controllink
26 class PMA
28 /**
29 * Holds database list
31 * @var PMA_List_Database
33 protected $databases = null;
35 /**
36 * DBMS user link
38 * @var resource
40 protected $userlink = null;
42 /**
43 * DBMS control link
45 * @var resource
47 protected $controllink = null;
49 /**
50 * magic access to protected/inaccessible members/properties
52 * @param string $param parameter name
54 * @return mixed
55 * @see http://php.net/language.oop5.overloading
57 public function __get($param)
59 switch ($param) {
60 case 'databases' :
61 return $this->getDatabaseList();
62 break;
63 case 'userlink' :
64 return $this->userlink;
65 break;
66 case 'controllink' :
67 return $this->controllink;
68 break;
71 return null;
74 /**
75 * magic access to protected/inaccessible members/properties
77 * @param string $param parameter name
78 * @param mixed $value value to set
80 * @return void
81 * @see http://php.net/language.oop5.overloading
83 public function __set($param, $value)
85 switch ($param) {
86 case 'userlink' :
87 $this->userlink = $value;
88 break;
89 case 'controllink' :
90 $this->controllink = $value;
91 break;
95 /**
96 * Accessor to PMA::$databases
98 * @return PMA_List_Databases
100 public function getDatabaseList()
102 if (null === $this->databases) {
103 $this->databases = new PMA_List_Database(
104 $this->userlink
108 return $this->databases;