Recommend this page to a friend! |
![]() |
Info | Example | Screenshots | ![]() |
![]() |
![]() |
Reputation | Support forum | Blog | Links |
Last Updated | Ratings | Unique User Downloads | Download Rankings | |||||
2025-02-09 (20 days ago) ![]() | Not enough user ratings | Total: 25 This week: 3 | All time: 11,257 This week: 20![]() |
Version | License | PHP version | Categories | |||
transfer-object 1.5.4 | MIT/X Consortium ... | 8.4 | Console, Code Generation, Design Patt..., P... |
Description | Author | |||
This package can generate transfer objects using property hooks. Innovation Award
|
|
<?php |
Would you like to build lightweight Transfer Objects (TO) easily? You're in the right place!
Imagine you have an array:
$data = [
'firstName' => 'Jan',
'lastName' => 'Kowalski'
];
TO facade method helps to convert array into YML
definition file:
Customer:
firstName:
type: string
lastName:
type: string
Generator console command builds TO based on definition file:
$customerTransfer = new CustomerTransfer();
$customerTransfer->firstName = 'Jan';
$customerTransfer->lastName = 'Kowalski';
How it works in action can be found on Wiki: - Try Sample to generate Definition files - Try Sample to generate TOs - Try Advanced Sample to generate TOs
Composer installation:
$ composer require picamator/transfer-object
Run command bellow to generate Transfer Objects:
$ ./vendor/bin/generate-transfer [-c|--configuration CONFIGURATION]
Please check Wiki for more details: - Command Configuration - Definition File
Facade interface DefinitionGeneratorFacadeInterface
is used to generate YML
definition file
based on array.
Please check Wiki for more details: - Facade Interfaces - Visualizing Diagrams
Many thanks for your contribution, supports, feedback and simply using Transfer Object Generator!
If you find this project useful, please add a star to the repository. Follow the project to stay updated with all activities. If you have suggestions for improvements or new features, feel free to create an issue or submit a pull request. Here is a Contribution Guide.
Please note that this project is released with a Code of Conduct. By participating in this project and its community, you agree to abide by those terms.
Transfer Object Generator is free and open-source software licensed under the MIT License. For more details, please see the LICENSE file.
Screenshots (2) | ||
![]() |
File | Role | Description | ||
---|---|---|---|---|
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() |
||||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Lic. | License text | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Data | Auxiliary data | ||
![]() ![]() |
Doc. | Documentation | ||
![]() ![]() |
Data | Auxiliary data |
The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page. |
![]() |
Version Control | Unique User Downloads | Download Rankings | |||||||||||||||
99% |
|
|
Applications that use this package |
If you know an application of this package, send a message to the author to add a link here.
Related pages |
Technical documentation |