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
| /** | |
| * Convert a value to studly caps case. | |
| * | |
| * @param string $value | |
| * | |
| * @return string | |
| */ | |
| public function studly(string $value): string | |
| { | |
| return \str_replace(' ', '', \ucwords(\str_replace(['-', '_'], ' ', $value))); |
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
| /** | |
| * Convert a string to snake case. | |
| * | |
| * @param string $value | |
| * @param string $delimiter Default to underscore | |
| * | |
| * @return string | |
| */ | |
| public function snake(string $value, ?string $delimiter = null): string | |
| { |
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 | |
| namespace App\Debugger; | |
| /** | |
| * usage example: $log = new MyLogger(); $logger->log($logger::ARGTRACE_NONE . $logger::BACKTRACE_NONE . $logger::SELF_ARGUMENTS_LOW, .......) | |
| */ | |
| //for Symfony project, this is put under src/Debugger/ folder | |
| //for Lumen and Laravel, this is put under app/Debugger/ folder | |
| //create logs directory under PROJECT_HOME |
NewerOlder