예제 #1
0
파일: index.php 프로젝트: Gnastw/CoursYNov
<?php

require 'BuilderInterface.php';
require 'Director.php';
require 'Vehicle.php';
require 'Car.php';
require 'Door.php';
require 'Engine.php';
require 'FerrariBuilder.php';
$director = new Director();
$ferrari = new FerrariBuilder();
var_dump($director->build($ferrari));
예제 #2
0
<?php

include 'class.php';
$data = [new Product('choux', 1.2, 0.055), new Product('hamburger', 2.5, 0.055), new Product('voiture', 1200, 0.199)];
$director = new Director();
$bill = new CarrefourBillBuilder();
echo $director->build($bill, $data);