Guest User

Untitled

a guest
Feb 21st, 2018
269
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. <?php
  2. /**
  3. * rhaco で autoload したかったからつくった
  4. *
  5. * @author riaf <riafweb@gmail.com>
  6. */
  7. require_once 'rhaco/Rhaco.php';
  8. Rhaco::import('io.FileUtil');
  9.  
  10. $files = FileUtil::ls(RHACO_DIR, true);
  11. $result = array();
  12. foreach($files as $file){
  13. if($file->getExtension() != '.php') continue;
  14. $result[$file->getOriginalName()] = str_replace('/', '.', substr(str_replace(RHACO_DIR, '', $file->getFullname()), 0, -4));
  15. }
  16.  
  17. var_export($result);
Add Comment
Please, Sign In to add comment