class Settings {
private $settings = array();
private static $_instance = null;
private function __construct() {
// getInstance ()
}
protected function __clone() {
//
}
static public function getInstance() {
if(is_null(self::$_instance))
{
self::$_instance = new self();
}
return self::$_instance;
}
public function import() {
// ...
}
public function get() {
// ...
}
}
Source: https://habr.com/ru/post/31375/