├── .gitignore ├── src ├── Facade │ ├── ClientData.php │ ├── TopPayments.php │ ├── PaymentHistory.php │ ├── ClientPersonalData.php │ ├── Statistics.php │ └── ClientFacade.php ├── Composite │ ├── Order.php │ ├── ProductOrder.php │ ├── ServiceOrder.php │ └── CompositeOrder.php ├── EventDispatcher │ ├── SenderInterface.php │ ├── EventManager.php │ └── BlogPublisher.php ├── Proxy │ ├── Cart.php │ ├── ShoppingCart.php │ └── CartProxy.php ├── Bridge │ ├── DirectPayment.php │ ├── CreditPayment.php │ ├── PaymentSource.php │ ├── DirectBuyer.php │ ├── CreditBuyer.php │ ├── DirectPaymentMethod.php │ ├── CreditPaymentMethod.php │ ├── Visa.php │ ├── MasterCard.php │ └── PaymentMethod.php ├── Command │ ├── PaymentMethod.php │ ├── PaymentProcessingException.php │ ├── PaypalPayment.php │ ├── VisaPayment.php │ ├── User.php │ └── PaymentProcessor.php ├── Decorator │ ├── PaymentMethod.php │ ├── VisaPayment.php │ ├── PaypalPayment.php │ ├── HtmlPaymentDetails.php │ └── PaymentDecorator.php ├── Mediator │ ├── UserAddress.php │ ├── UserUpdater.php │ ├── OrderDelivery.php │ ├── UserDetails.php │ ├── Mediator.php │ └── Observable.php ├── Visitor │ ├── PaymentMethod.php │ ├── PaymentVisitor.php │ ├── VisaPayment.php │ ├── PaypalPayment.php │ ├── SimplePaymentDetails.php │ └── HtmlPaymentDetails.php ├── AbstractServer │ ├── Rose.php │ ├── RedRose.php │ ├── YellowRose.php │ └── ShopOwner.php ├── State │ ├── DeliveryState.php │ ├── OnRoute.php │ ├── Processing.php │ ├── AtDestination.php │ └── Delivery.php ├── Observer │ ├── ProductObserver.php │ ├── ProductSubject.php │ ├── HardDisk.php │ ├── EmailNotifier.php │ └── DesktopNotifier.php ├── Factory │ ├── Product.php │ ├── Keyboard.php │ ├── Mouse.php │ ├── ProductFactory.php │ └── ShoppingCart.php ├── Adapter │ ├── TheOldRoseInterface.php │ ├── ProductInterface.php │ ├── RealWhiteRose.php │ └── RoseToProductAdapter.php ├── Template │ ├── SellProducts.php │ ├── SellServices.php │ └── Sell.php ├── Strategy │ ├── PriceCaculator.php │ ├── PriceComputer.php │ ├── USAPricingStrategy.php │ └── EuropePricingStrategy.php ├── Gateway │ ├── CartGateway.php │ ├── InMemoryCart.php │ ├── FileCart.php │ └── ShoppingHistory.php ├── Repository │ ├── TypeFactory.php │ ├── TypeGateway.php │ ├── ProductType.php │ └── ProductTypeRepository.php ├── Null │ ├── ProductProvider.php │ ├── NullProduct.php │ └── Receipt.php ├── Monostate │ └── Monostate.php ├── Singleton │ ├── PriceCalculator.php │ └── DiscountProvider.php └── ActiveObject │ ├── MultipleFileUploader.php │ └── UploadCommand.php ├── composer.json ├── LICENSE └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | vendor/ 2 | composer.lock 3 | -------------------------------------------------------------------------------- /src/Facade/ClientData.php: -------------------------------------------------------------------------------- 1 | send(); 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /src/Composite/ProductOrder.php: -------------------------------------------------------------------------------- 1 | products; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Mediator/UserUpdater.php: -------------------------------------------------------------------------------- 1 | changeAddress($address); 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /src/Adapter/TheOldRoseInterface.php: -------------------------------------------------------------------------------- 1 | approve()) { 10 | $payment->send(); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Composite/ServiceOrder.php: -------------------------------------------------------------------------------- 1 | provider->orderNewItem($this); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Strategy/PriceCaculator.php: -------------------------------------------------------------------------------- 1 | humanResources->mark(2); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Adapter/ProductInterface.php: -------------------------------------------------------------------------------- 1 | deliveryAddress = $address; 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/Gateway/CartGateway.php: -------------------------------------------------------------------------------- 1 |