Add Litlab

This commit is contained in:
2025-07-04 13:35:51 +03:00
parent 1cf6e3d7d2
commit dabbf541dc
17 changed files with 159 additions and 17 deletions

View File

@@ -16,7 +16,7 @@ use Pattern\Creational\{Singleton\Single, Singleton\Singleton};
*
* @noinspection ForgottenDebugOutputInspection
*/
function clientCode(): void
function client(): void
{
$output = [
'where' => trace(),
@@ -36,7 +36,8 @@ function clientCode(): void
dump($output, $output['s1']->getValue(), $output['s2']->getValue());
}
clientCode();
?><img class="diagram" src="/assets/img/diagrams/singleton.png" alt="Adapter DEsign Pattern Diagram"><?php
client();
$single = Single::getInstance('from subclass');
$single->setValue('value set from Single::class')->childish();