mirror of
https://github.com/DesignPatternsPHP/DesignPatternsPHP.git
synced 2025-08-03 13:37:27 +02:00
Remove single file for SimpleFactory usage example
And move code to code-block
This commit is contained in:
@@ -43,12 +43,13 @@ Bicycle.php
|
|||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
Usage/SimpleFactoryUsage.php
|
.. code-block:: php
|
||||||
|
|
||||||
.. literalinclude:: Usage/SimpleFactoryUsage.php
|
|
||||||
:language: php
|
|
||||||
:linenos:
|
:linenos:
|
||||||
|
|
||||||
|
$factory = new SimpleFactory();
|
||||||
|
$bicycle = $factory->createBicycle();
|
||||||
|
$bicycle->driveTo('Paris');
|
||||||
|
|
||||||
Test
|
Test
|
||||||
----
|
----
|
||||||
|
|
||||||
|
@@ -1,9 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace DesignPatterns\Creational\SimpleFactory\Usage;
|
|
||||||
|
|
||||||
use DesignPatterns\Creational\SimpleFactory\SimpleFactory;
|
|
||||||
|
|
||||||
$factory = new SimpleFactory();
|
|
||||||
$bicycle = $factory->createBicycle();
|
|
||||||
$bicycle->driveTo('Paris');
|
|
Reference in New Issue
Block a user