Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot import class file located in a directory named that includes dot #24

Closed
mrook opened this issue Jan 4, 2012 · 0 comments
Closed
Assignees
Milestone

Comments

@mrook
Copy link
Member

mrook commented Jan 4, 2012

Cannot import class file located in a directory named that includes dot(such as "Foo-x.y.z\FooTask.php").

I propose a solution to fix it.

{{{
Phing::import() {
:
$path = strtr($dotPath, '.', DIRECTORY_SEPARATOR) . ".php";
:
}

}}}

to

{{{
Phing::import() {
:
$dotClassname = basename($dotPath);
$dotClassnamePos = strlen($dotPath) - strlen($dotClassname);
$classFile = strtr($dotClassname, '.', DIRECTORY_SEPARATOR) . ".php";
$path = substr_replace($dotPath, $classFile, $dotClassnamePos);
:
}

}}}

@ghost ghost assigned mrook Jan 4, 2012
@mrook mrook closed this as completed Jan 4, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant