Recommend this page to a friend! |
Download .zip |
Info | Example | View files (94) | Download .zip | Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2022-06-03 (15 days ago) | Not yet rated by the users | Total: 78 This week: 2 | All time: 9,878 This week: 72 |
Version | License | PHP version | Categories | |||
php-design-patterns 1.0 | MIT/X Consortium ... | 5 | PHP 5, Design Patterns |
Description | Author | |
This package provides an implementation of design patterns with examples. |
Files |
File | Role | Description | ||
---|---|---|---|---|
src (2 directories) | ||||
composer.json | Data | Auxiliary data | ||
composer.lock | Data | Auxiliary data |
Files | / | src | / | Creational |
File | Role | Description | ||
---|---|---|---|---|
AbstractFactory (10 files, 1 directory) | ||||
Builder (8 files, 2 directories) | ||||
FactoryMethod (7 files, 1 directory) | ||||
Pool (2 files, 1 directory) | ||||
Prototype (3 files, 1 directory) | ||||
SimpleFactory (2 files, 1 directory) | ||||
Singleton (1 file, 1 directory) | ||||
StaticFactory (4 files, 1 directory) |
Files | / | src | / | Creational | / | AbstractFactory |
File | Role | Description | ||
---|---|---|---|---|
tests (1 file) | ||||
CSVWriterInterface.php | Class | Class source | ||
init.php | Example | Example script | ||
JsonWriterInterface.php | Class | Class source | ||
UnixCSVWriter.php | Class | Class source | ||
UnixJsonWriter.php | Class | Class source | ||
UnixWriterFactory.php | Class | Class source | ||
WinCSVWriter.php | Class | Class source | ||
WinJsonWriter.php | Class | Class source | ||
WinWriterFactory.php | Class | Class source | ||
WriterFactoryInterface.php | Class | Class source |
Files | / | src | / | Creational | / | AbstractFactory | / | tests |
File | Role | Description |
---|---|---|
AbstractFactoryTest.php | Class | Class source |
Files | / | src | / | Creational | / | Builder |
File | Role | Description | ||
---|---|---|---|---|
Parts (4 files) | ||||
Test (1 file) | ||||
AbstractVehicle.php | Class | Class source | ||
BuilderInterface.php | Class | Class source | ||
Car.php | Class | Class source | ||
CarBuilder.php | Class | Class source | ||
Director.php | Class | Class source | ||
init.php | Aux. | Auxiliary script | ||
Truck.php | Class | Class source | ||
TruckBuilder.php | Class | Class source |
Files | / | src | / | Creational | / | Builder | / | Parts |
File | Role | Description |
---|---|---|
Door.php | Class | Class source |
Engine.php | Class | Class source |
VehiclePartInterface.php | Class | Class source |
Wheel.php | Class | Class source |
Files | / | src | / | Creational | / | FactoryMethod |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
FileLogger.php | Class | Class source | ||
FileLoggerFactory.php | Class | Class source | ||
init.php | Aux. | Auxiliary script | ||
LoggerFactoryInterface.php | Class | Class source | ||
LoggerInterface.php | Class | Class source | ||
StdOutLogger.php | Class | Class source | ||
StdOutLoggerFactory.php | Class | Class source |
Files | / | src | / | Creational | / | FactoryMethod | / | test |
File | Role | Description |
---|---|---|
FactoryMethodTest.php | Class | Class source |
Files | / | src | / | Creational | / | Pool |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
StringReverseWorker.php | Class | Class source | ||
WorkerPool.php | Class | Class source |
Files | / | src | / | Creational | / | Prototype |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
BarPrototype.php | Class | Class source | ||
BookPrototype.php | Class | Class source | ||
FooPrototype.php | Class | Class source |
Files | / | src | / | Creational | / | Prototype | / | test |
File | Role | Description |
---|---|---|
PrototypeTest.php | Class | Class source |
Files | / | src | / | Creational | / | SimpleFactory |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
Bicycle.php | Class | Class source | ||
SimpleFactory.php | Class | Class source |
Files | / | src | / | Creational | / | SimpleFactory | / | test |
File | Role | Description |
---|---|---|
SimpleFactoryTest.php | Class | Class source |
Files | / | src | / | Creational | / | Singleton |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
Singleton.php | Class | Class source |
Files | / | src | / | Creational | / | Singleton | / | test |
File | Role | Description |
---|---|---|
SingletonTest.php | Class | Class source |
Files | / | src | / | Creational | / | StaticFactory |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
Formatter.php | Class | Class source | ||
NumberFormatter.php | Class | Class source | ||
StaticFactory.php | Class | Class source | ||
StringFormatter.php | Class | Class source |
Files | / | src | / | Creational | / | StaticFactory | / | test |
File | Role | Description |
---|---|---|
StaticFactoryTest.php | Class | Class source |
Files | / | src | / | Structural |
File | Role | Description | ||
---|---|---|---|---|
Adapter (5 files, 1 directory) | ||||
Bridge (6 files, 1 directory) | ||||
Composite (4 files, 1 directory) | ||||
DataMapper (3 files, 1 directory) | ||||
Decorator (5 files, 1 directory) | ||||
DependencyInjection (2 files, 1 directory) | ||||
Facade (3 files, 1 directory) | ||||
FluentInterface (2 files, 1 directory) | ||||
Flyweight (4 files, 1 directory) |
Files | / | src | / | Structural | / | Adapter |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
BookInterface.php | Class | Class source | ||
EbookAdapter.php | Class | Class source | ||
EbookInterface.php | Class | Class source | ||
Kindle.php | Class | Class source | ||
PaperBook.php | Class | Class source |
Files | / | src | / | Structural | / | Bridge |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
BridgeService.php | Class | Class source | ||
FormatterInterface.php | Class | Class source | ||
HelloWorldService.php | Class | Class source | ||
HtmlFormatter.php | Class | Class source | ||
PingService.php | Class | Class source | ||
TextFormatter.php | Class | Class source |
Files | / | src | / | Structural | / | Composite |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
ButtonElement.php | Class | Class source | ||
Form.php | Class | Class source | ||
InputElement.php | Class | Class source | ||
RenderableInterface.php | Class | Class source |
Files | / | src | / | Structural | / | Composite | / | test |
File | Role | Description |
---|---|---|
CompositeTest.php | Class | Class source |
Files | / | src | / | Structural | / | DataMapper |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
StorageAdapter.php | Class | Class source | ||
User.php | Class | Class source | ||
UserMapper.php | Class | Class source |
Files | / | src | / | Structural | / | DataMapper | / | test |
File | Role | Description |
---|---|---|
DataMapperTest.php | Class | Class source |
Files | / | src | / | Structural | / | Decorator |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
BookingDecorator.php | Class | Class source | ||
DecoratorInterface.php | Class | Class source | ||
DoubleBedBooking.php | Class | Class source | ||
ExtraBed.php | Class | Class source | ||
Wifi.php | Class | Class source |
Files | / | src | / | Structural | / | Decorator | / | test |
File | Role | Description |
---|---|---|
DecoratorTest.php | Class | Class source |
Files | / | src | / | Structural | / | DependencyInjection |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
DataBaseConfiguration.php | Class | Class source | ||
DatabaseConnection.php | Class | Class source |
Files | / | src | / | Structural | / | DependencyInjection | / | test |
File | Role | Description |
---|---|---|
DependencyInjectionTest.php | Class | Class source |
Files | / | src | / | Structural | / | Facade |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
BIOS.php | Class | Class source | ||
Facade.php | Class | Class source | ||
OperatingSystem.php | Class | Class source |
Files | / | src | / | Structural | / | FluentInterface |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
SQLBuilder.php | Class | Class source | ||
SQLBuilderInterface.php | Class | Class source |
Files | / | src | / | Structural | / | FluentInterface | / | test |
File | Role | Description |
---|---|---|
FluentInterfaceTest.php | Class | Class source |
Files | / | src | / | Structural | / | Flyweight |
File | Role | Description | ||
---|---|---|---|---|
test (1 file) | ||||
Char.php | Class | Class source | ||
TextFactory.php | Class | Class source | ||
TextInterface.php | Class | Class source | ||
Word.php | Class | Class source |
Files | / | src | / | Structural | / | Flyweight | / | test |
File | Role | Description |
---|---|---|
FlyWeightTest.php | Class | Class source |
php-design-patterns-2022-06-03.zip 45KB | |
php-design-patterns-2022-06-03.tar.gz 18KB | |
Install with Composer |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
100% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.