Instantiating classes from other components - Joomla! Forum - community, help and support


hi

i've been developing site while , have built number of components scratch. want build new component, want code new component can instantiate classes other components i've created. know can use php include other files , therefore instantiate class want, wondered if there preferred way of doing things in joomla!

specifically want create component2 make calls methods in model class of component1.

any received gratefully.

thanks,

with "jimport" can use joomla's default classes in component.

to use own class own component1 in component2,
i think indeed have import them "require_once".

have considered putting code want re-use in components in own library extension?
(overview of libraries in back-end > extension manager > manage > [select type] drop down filter -> library)





Comments