I
I
Igor Tkachenko2015-02-06 12:42:31
Kohana
Igor Tkachenko, 2015-02-06 12:42:31

How to include a class if it is not in the system Kohana directory?

(We are talking about the Kohana framework) I
created the 'api' directories in the 'application' directory, in the 'api' directory create the Api.php class, I try to connect it in bootstrap.php in this way: But I still can't use it, it says no such a class. Actually, how to connect and use this class, for example, for the purposes of creating api?
Kohana::auto_load('Api', 'api');

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Shamanov, 2015-02-06
@SilenceOfWinter

Classes must be located in the classes directory application/classes/Api/Api.php, and the class itself must be named Api_Api accordingly

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question