logo       

[symfony-users] How do I get a module path?: msg#00841

symfony-users

Subject: [symfony-users] How do I get a module path?

Hi all,

how do I get a molude path using symfony classes? I have only the module name and it can be a plugin module.

Today I loop trought all the plugins, but I believe sf has a better way to do that:

$pc = sfProjectConfiguration::getActive();
        $paths = $pc->getPluginPaths();
        $basepath = '../apps/frontend';
        array_unshift($paths, $basepath);
        $filepath = '/modules/' . $moduleName . '/actions/actions.class.php';
        $done = false;
        foreach($paths as $path) {
            $path .= $filepath;
            if(file_exists($path)) {

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "symfony users" group.
To post to this group, send email to symfony-users@xxxxxxxxxxxxxxxx
To unsubscribe from this group, send email to symfony-users+unsubscribe@xxxxxxxxxxxxxxxx
For more options, visit this group at http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | Mail Home | sitemap | FAQ | advertise