如果您查看代码,它的定义明确且公开。
<?php
class Config {
public function prep_connections($collection){
}
public function get_connctions(){
require_once('readfile.php');
$reader = new Readfile();
$collections = json_decode($reader->read("../../config/database.cfg"));
foreach($collections as $collection){
prep_connections($collection);
}
}
}
$config = new Config();
$connections = $config->get_connctions();