Answer the question
In order to leave comments, you need to log in
How to implement the correct connection of classes in a PHP project?
Project - RESTfull API.
A router is used, class functions are called something like this (Slim framework):
class Foo {
public function bar ($request, $response, $args) {
echo "Test";
}
}
// GET '/foo/bar'
$app->get('foo/bar', '\Foo:bar');
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question