We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Call to undefined method Phalcon\Loader::isRegistered()

Hey. Here is my file loader.php :

<?php use Phalcon\Loader;

$loader = new Loader(); $loader->registerNamespaces( [ 'App\Controllers' => DIR . '/app/controllers/', 'App\Models' => DIR . '/app/models/', ] );

$loader->register();

echo $loader->isRegistered();

I receive an error:

Fatal error: Uncaught Error: Call to undefined method Phalcon\Loader::isRegistered()

framework is installed and running, I checked. what could be the problem?

there may be Russian-speaking developers who could help me understand the basics of working for a small fee?



2.2k
Accepted
answer

Easy, right? There is no method called: 'isRegistered'. See docs https://docs.phalcon.io/3.4/en/api/phalcon_loader



4.3k

Easy, right? There is no method called: 'isRegistered'. See docs https://docs.phalcon.io/3.4/en/api/phalcon_loader

Install v4

I look at the documentation: https://docs.phalcon.io/4.0/en/loader#registration it states:

echo $loader->isRegistered(); // true

but I have the same error:

Fatal error: Uncaught Error: Call to undefined method Phalcon\Loader::isRegistered()

what am I doing wrong?