This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* To use copy the column names from your DB and execute `php magento-phpdoc-getter-setter-generation.php <model?` | |
* Then paste column names into your console and hit CTRL-D | |
* For example | |
*[kschroeder@localhost tests]$ php test.php SomeModel | |
order_id | |
requester_id | |
decider_id |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$returnValue = $argv[1]??'void'; | |
$output = "/**\n"; | |
$lines = explode("\n", file_get_contents('php://stdin')); | |
foreach ($lines as $line) { | |
$column = explode(' ', $line); | |
$column = array_shift($column); | |
$generatedName = explode('_', $column); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$returnValue = $argv[1]??'void'; | |
$output = "/**\n"; | |
$lines = explode("\n", file_get_contents('php://stdin')); | |
foreach ($lines as $line) { | |
$column = explode(' ', $line); | |
$column = array_shift($column); | |
$generatedName = explode('_', $column); |