PHP Classes

File: bin/plain-to-class-clear

Recommend this page to a friend!
  Classes of Andrey Iatsenko   PHP Plain Object with Class Variables Set from Array Values   bin/plain-to-class-clear   Download  
File: bin/plain-to-class-clear
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: PHP Plain Object with Class Variables Set from Array Values
Initialize data objects from arrays of values
Author: By
Last change:
Date: 11 months ago
Size: 635 bytes
 

Contents

Class file image Download
#!/usr/bin/env php <?php function deleteDir($dirPath) { if (!str_ends_with($dirPath, '/')) { $dirPath .= '/'; } $files = glob($dirPath . '*', GLOB_MARK); foreach ($files as $file) { echo 'Remove' . $file . PHP_EOL; if (is_dir($file)) { deleteDir($file); } else { unlink($file); } } rmdir($dirPath); } if (file_exists(__DIR__ . '/../.cache')) { deleteDir(__DIR__ . '/../.cache'); } elseif (file_exists(__DIR__ . '/../vendor/yzen.dev/plain-to-class/.cache')) { deleteDir(__DIR__ . '/../vendor/yzen.dev/plain-to-class/.cache'); } exit(0);