Code: Select all
class Config
{
private static $instance;
private function __construct() {
echo '<p>Constructing</p>';
}
public static function getInstance()
{
if ( is_null ( self::$instance ) )
{
self::$instance = new self();
}
return self::$instance;
}
public function clear() {
echo '<p>clearing...</p>';
self::$instance = null;
}
}Any insight would be greatly appreciated.
Thanks.
Rob