From 770b3c7364dcea139eb5a2204b3648c4825e3f69 Mon Sep 17 00:00:00 2001 From: Silvio Date: Fri, 23 Jul 2010 17:53:51 -0300 Subject: Adding a perl singleton --- classes/PerlSingleton.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 classes/PerlSingleton.php (limited to 'classes/PerlSingleton.php') diff --git a/classes/PerlSingleton.php b/classes/PerlSingleton.php new file mode 100644 index 0000000..c606cfe --- /dev/null +++ b/classes/PerlSingleton.php @@ -0,0 +1,17 @@ +perl = new Perl(); + } + + public static function getInstance() { + if(self::$instance == null) { + self::$instance = new self; + } + + return self::$instance->perl; + } +} -- cgit v1.2.3