File tree Expand file tree Collapse file tree 2 files changed +14
-5
lines changed
Patterns/Creational/StaticFactory/Suppliers Expand file tree Collapse file tree 2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -83,10 +83,6 @@ public function acmePrototype()
83
83
84
84
public function staticFactory ()
85
85
{
86
- $ supplier = \App \Patterns \Creational \StaticFactory \Suppliers \FlightSupplierFactory::get (1 );
87
- echo $ supplier ->request ('My booking was cancelled without prior notification ' ) . "<br/><br/> " ;
88
-
89
- $ supplier = \App \Patterns \Creational \StaticFactory \Suppliers \FlightSupplierFactory::get (2 );
90
- echo $ supplier ->request ('Please book a ticket for me ' );
86
+ (new \App \Patterns \Creational \StaticFactory \Suppliers \Application )->render ();
91
87
}
92
88
}
Original file line number Diff line number Diff line change
1
+ <?php namespace App \Patterns \Creational \StaticFactory \Suppliers ;
2
+
3
+ class Application
4
+ {
5
+ public function render ()
6
+ {
7
+ $ supplier = FlightSupplierFactory::get (1 );
8
+ echo $ supplier ->request ('My booking was cancelled without prior notification ' ) . "<br/><br/> " ;
9
+
10
+ $ supplier = FlightSupplierFactory::get (2 );
11
+ echo $ supplier ->request ('Please book a ticket for me ' );
12
+ }
13
+ }
You can’t perform that action at this time.
0 commit comments