mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-07-29 03:00:15 +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
|
:language: php
|
||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
|
Usage
|
||||||
|
-----
|
||||||
|
|
||||||
|
.. code:: php
|
||||||
|
|
||||||
|
$factory = new ConcreteFactory();
|
||||||
|
$bicycle = $factory->createVehicle('bicycle');
|
||||||
|
$bicycle->driveTo('Paris');
|
||||||
|
|
||||||
Test
|
Test
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user