具有数据库数组的私有类

时间:2019-03-23 02:58:08

标签: php arrays class

我有一个带有数组的私有类:

class Whois{
    private $whoisServers = array(
  "ac"=> "whois.nic.ac",
  "ae" => "whois.nic.ae",
  "tech" => "whois.nic.tech",
  "yu" => "whois.ripe.net");
}

现在,可能从数据库中获取私有$ whoisServers的array()吗?

1 个答案:

答案 0 :(得分:2)

现在使一个类成为对象并访问公共功能。

if(false && something_that_crashes_the_browser())