Registering a class library within a plugin I am trying to instantiate a class from a third-party library from within a controller. Probably not the best place to do this but just testing.

require(craft()-&gt;path-&gt;getPluginsPath().'myplugin/vendor/ifpk/src/fsdk.php');

$app = new fSDK;


I get the following error

Fatal error: Class 'Craft\fSDK' not found in /var/www/.../controllers/MyPluginController.php on line 57


Not sure where to go with this next.
Through the magic of PHP namespacing, all plugins fall under the Craft parent class by default.

Since you're accessing a library outside of the Craft scope, you'll need to prepend a backslash to your library's class name:

$app = new \fSDK;