Factory Method
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
<!doctype html>
|
||||
<?php
|
||||
require '../vendor/autoload.php';
|
||||
require '../src/helpers.php';
|
||||
?><!doctype html>
|
||||
<html lang="uk">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
@@ -10,31 +13,49 @@
|
||||
<script src="assets/js/highlight.min.js"></script>
|
||||
<script src="assets/js/stylus.min.js"></script>
|
||||
<style>
|
||||
html, body {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 100dvh;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background: #ddd;
|
||||
color: #1c1b19;
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
}
|
||||
|
||||
main {
|
||||
box-shadow: -1px 1px 5px 0 rgba(123, 123, 123, 1);
|
||||
-webkit-box-shadow: -1px 1px 5px 0 rgba(123, 123, 123, 1);
|
||||
-moz-box-shadow: -1px 1px 5px 0 rgba(123, 123, 123, 1);
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
max-width: 1280px;
|
||||
margin: 0 auto;
|
||||
outline: dotted 1px #a9a49f;
|
||||
padding: 1rem;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
}
|
||||
|
||||
pre {
|
||||
font-family: Consolas, monospace;
|
||||
align-self: center;
|
||||
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<?php
|
||||
<main>
|
||||
<?php
|
||||
/** Creational patterns **/
|
||||
|
||||
use Pattern\Creational\Singleton;
|
||||
|
||||
require '../vendor/autoload.php';
|
||||
require '../src/helpers.php';
|
||||
|
||||
|
||||
|
||||
// Creational patterns
|
||||
require '../code/singleton.php';
|
||||
|
||||
|
||||
|
||||
|
||||
?>
|
||||
</main>
|
||||
<script>hljs.highlightAll();</script>
|
||||
// require '../code/singleton.php';
|
||||
require '../code/factory_method.php';
|
||||
?>
|
||||
</main>
|
||||
<script>hljs.highlightAll()</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user