mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-28 18:50:11 +02:00
Merge pull request #191 from juuuuuu/master
Added usage example on Creational/SimpleFactory
This commit is contained in:
@@ -48,6 +48,15 @@ Scooter.php
|
||||
:language: php
|
||||
:linenos:
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
||||
.. code:: php
|
||||
|
||||
$factory = new ConcreteFactory();
|
||||
$bicycle = $factory->createVehicle('bicycle');
|
||||
$bicycle->driveTo('Paris');
|
||||
|
||||
Test
|
||||
----
|
||||
|
||||
|
Reference in New Issue
Block a user