// Check if this helper has already been loaded
if (in_array($filename,
$loaded, true
)) { continue;
} // If the file is namespaced, we'll just grab that
// file and not search for any others
if (strpos($filename, '\\'
) !== false
) { $path =
$loader->
locateFile($filename, 'Helpers'
);
if (empty($path)) { throw FileNotFoundException::
forFileNotFound($filename);
} $includes[] =
$path;
$loaded[] =
$filename;
} else { // No namespaces, so search in all available locations
$paths =
$loader->
search('Helpers/' .
$filename);
foreach ($paths as $path) { if (strpos($path, APPPATH . 'Helpers' . DIRECTORY_SEPARATOR
) === 0
) { $appHelper =
$path;
}