Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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?



369
Accepted
answer

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



798

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?