aboutsummaryrefslogtreecommitdiff
path: root/classes/PerlSingleton.php
diff options
context:
space:
mode:
Diffstat (limited to 'classes/PerlSingleton.php')
-rw-r--r--classes/PerlSingleton.php17
1 files changed, 17 insertions, 0 deletions
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 @@
+<?php
+
+class PerlSingleton {
+ private static $instance = null;
+
+ private function __construct() {
+ $this->perl = new Perl();
+ }
+
+ public static function getInstance() {
+ if(self::$instance == null) {
+ self::$instance = new self;
+ }
+
+ return self::$instance->perl;
+ }
+}