} if ($success) { echo "Success!\n\n"; } else { echo "Failure...\n\n"; } $paths = Loader\Module::getModuleIdentityPaths($top); echo "Identity Paths: \n"; foreach ($paths as $path) { echo " {$path}\n"; } echo " Retrieve As Array (root firstModule) -> "; $success = true; $folders = null; try { $folders = Loader\Module::getAsArray($top); } catch (\Exception $e) { $success = false; } if ($success) { echo "Success!\n\n"; } else { echo "Failure...\n\n"; } var_dump($folders); echo "\n Retrieve Using Data (path2) -> "; $success = true; $ret = null; try { $ret = Loader\Module::pathBelongsTo($path2, $top); } catch (\Exception $e) {
/** * This retrieves the Modules as a giant array from the library * * This recursively traces through the Modules, returning arrays * in arrays, path => the path, and Modules => the Modules which themselves * are returned as arrays. * * @return array * */ public function getLibraryModulesAsArray() { return Loader\Module::getAsArray($this->libraries); }