Welcome Guest, Not a member yet? Register   Sign In
Class not found
#4

(This post was last modified: 05-19-2021, 06:37 AM by iRedds.)

Yes, it is needed.
There are two options for calling a class in a namespace.

1
use Sendpulse\RestApi\ApiClient;
new ApiClient();

2
new \Sendpulse\RestApi\ApiClient();

The result will be the same.

Error "Class 'Sendpulse\RestApi\ApiClient' not found." means that the script cannot determine the location of the class.

There are three possible reasons:
1. The composer is not included
2. The library is not installed
3. The library is not installed correctly / the composer has not indexed the library in the boot files.

In the third case, you can try reindexing 'composer dump-autoload' or reinstalling the library.

If the installation and/or indexing was successful, then an entry about the path to the library should appear in the vendor/composer/autoload_psr4.php file.
Reply


Messages In This Thread
Class not found - by richb201 - 05-18-2021, 12:59 PM
RE: Class not found - by iRedds - 05-18-2021, 08:00 PM
RE: Class not found - by richb201 - 05-19-2021, 03:55 AM
RE: Class not found - by iRedds - 05-19-2021, 06:37 AM
RE: Class not found - by richb201 - 05-19-2021, 07:12 AM
RE: Class not found - by iRedds - 05-19-2021, 07:23 AM
RE: Class not found - by paulbalandan - 05-19-2021, 10:20 AM
RE: Class not found - by richb201 - 05-19-2021, 12:53 PM



Theme © iAndrew 2016 - Forum software by © MyBB