Load Class from third Component

Skip to first unread message

Christoforos Korifidis

Mar 22, 2024, 7:11:08 AMMar 22
to Joomla! General Development
I am trying to develop a plugin to import data from an external service to IGagenda.

At a point after I got external data I am trying to collaborate with ICagenda and I have to use same of it's classes.

I import these classes for example like this:

use iCutilities\Event\Event as icagendaEvent;

and later when I try to use it like this


I get error:

Class "iCutilities\Event\Event" not found

An help is appreciated.

Adam Melcher

Mar 22, 2024, 9:34:39 AMMar 22
to joomla-de...@googlegroups.com

Assuming you are using namespacing at the top of the file:

use iCutilities\Event\Event as icagendaEvent;

and calling the class and function down the page correctly, the error message is saying that it can't find  iCutilities\Event\Event so either the file doesn't exist, is in a different location, or most likely isn't namespaced properly at the top such as: namespace  iCutilities\Event\Event;  

You received this message because you are subscribed to the Google Groups "Joomla! General Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to joomla-dev-gene...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/joomla-dev-general/686079a3-578c-4c34-be2f-767479b6728en%40googlegroups.com.


Mar 24, 2024, 5:57:44 AMMar 24
to Joomla! General Development

The namespace isn't in the Joomla programming rule.
See : https://www.dionysopoulos.me/book/concepts.html#concepts-namespaces

Look if you find it in /administrator/cache/autoload_psr4.php
(Need to have a namespace tag in the manifest of the component of the model called).
Reply all
Reply to author
0 new messages