class PageSearch
{
+ public $handlers = [];
+
function __construct($path = '.')
{
$this->iterator = new RecursiveCallbackFilterIterator(
# skip hidden files and directories
return FALSE;
}
+ if (file_exists($current->getFilename() . '/index.php')) {
+ # contents better provided by handler code
+ $this->handlers[ $current->getPathname() ] = $current;
+ return FALSE;
+ }
if ($current->isLink()) {
# ignore symlinks, original contents only
return FALSE;