php Class RootGenerator private static instance null private static ge

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
<?php
Class RootGenerator {
private static $instance = null;
private static $generator = null;
private function __construct() {
# code...
}
protected function __clone ()
{
# code...
}
public static function getInstance ()
{
if(is_null($instance))
{
self::$instance = new PHPExcel();
self::$instance->getProperties()->setCreator("Sdm-club administrator")
->setLastModifiedBy("Sdm-club administrator")
->setTitle("Office 2007 XLSX Document")
->setSubject("Office 2007 XLSX Document")
->setDescription("Test document for Office 2007 XLSX, generated using PHP classes.")
->setKeywords("office 2007 openxml php")
->setCategory("Report file");
}
return self::$instance;
}
}