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

Define path to custom class #38

Closed
kamov opened this issue May 22, 2013 · 2 comments
Closed

Define path to custom class #38

kamov opened this issue May 22, 2013 · 2 comments

Comments

@kamov
Copy link

kamov commented May 22, 2013

Hi,

I just start play with flight, very nice!

I have a questions regarding routing to a specific class/method.

The code example that call Greetings class:

require 'flight/Flight.php';
Flight::route('/', array('Greetings','hello'));
Flight::start();

work fine only if Greetings.php class is on the root.
How to move this into a subfolder and setup the path?

The same when register a new class.
How to put this into a folder example Library, and then register this class?

Thanks

@qlimax86
Copy link

You might look at this method:

Flight::path('/your/class/path');

@kamov
Copy link
Author

kamov commented May 22, 2013

So simple!
Big thanks!

@kamov kamov closed this as completed Jun 2, 2013
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

2 participants