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

Relative path with ../ not implemented #10

Open
IamSAB opened this issue Mar 21, 2019 · 0 comments
Open

Relative path with ../ not implemented #10

IamSAB opened this issue Mar 21, 2019 · 0 comments

Comments

@IamSAB
Copy link

IamSAB commented Mar 21, 2019

Consider the following project structure:

  • Model
    • Hello.php
  • ...
  • public
    • index.php

When I write

$axel->addModule(new Axel\Module\PSR4('../Model', '\\Model'));

in my index.php, autoload fails.
As public is the working directory, you can add Model as Library only with using an absolute path, as Axel does not support '../', it does only replace './' with '':

if ($baseDir[0] == '/' || $baseDir[1] == ':') $this->baseDir = $baseDir;
else $this->baseDir = getcwd() . DIRECTORY_SEPARATOR . str_replace(['./'], '', $baseDir);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant