I'm using composer to import a third-party (vendor) plugin into my own Craft plugin. But can't figure out how I extend the functionality of the imported (vendor) plugin.
For example assuming imported plugin defines a base class of XXX
I can try to extend this with class YYY extends \XXX
but not sure where I save this so I can access this in my code, eg I want to extend the base plugin through a class, eg
class YYY extends \XXX
{
public function doThis($str) { return $str; }
}
I'd then want to access this in my Craft plugin with
$var = new \XXX();
$var->doThis = 'CONTENT HERE';
Obviously grossly simplified but hope you get the gist. Just can't figure out how to achieve above or where I should save the code that is extending the vendor class?
Any thoughts?