Skip to content

Instantly share code, notes, and snippets.

@riaf
Created December 7, 2008 13:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save riaf/33149 to your computer and use it in GitHub Desktop.
Save riaf/33149 to your computer and use it in GitHub Desktop.
<?php
/**
* rhaco で autoload したかったからつくった
*
* @author riaf <riafweb@gmail.com>
*/
require_once 'rhaco/Rhaco.php';
Rhaco::import('io.FileUtil');
$files = FileUtil::ls(RHACO_DIR, true);
$result = array();
foreach($files as $file){
if($file->getExtension() != '.php') continue;
$result[$file->getOriginalName()] = str_replace('/', '.', substr(str_replace(RHACO_DIR, '', $file->getFullname()), 0, -4));
}
var_export($result);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment