Last active
March 20, 2019 17:52
-
-
Save kanian/a476a2ae24d2723cc74bb6515c7f3607 to your computer and use it in GitHub Desktop.
Singleton example generated
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace Assoa\Yo; | |
class Yo_Singleton_95e46b35_8481_466e_b493_f7443d7bf7ee extends Yo | |
{ | |
private static $subjectInstance; | |
function __construct() | |
{ | |
$args = func_get_args(); | |
if (self::$subjectInstance === null) { | |
self::$subjectInstance = new Yo(...$args); | |
} | |
return self::$subjectInstance; | |
} | |
function hein(string $param1) | |
{ | |
$args = func_get_args(); | |
self::$subjectInstance->hein(...$args); | |
} | |
function what() | |
{ | |
$args = func_get_args(); | |
return self::$subjectInstance->what(...$args); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment