I have external library handling connection to mail delivery system. Its just php class. How do i include and use this class inside craft plugin controller?
library.php:
class mail_delivery{
//code
}
plugin/controllers/controller.php:
namespace Craft;
class controller extends BaseController
{
public function init()
{
require_once 'library.php';
}
public function method(){
$object = $rest = new mail_delivery();
}
I get PHP error:
( ! ) Fatal error: Class 'Craft\FmRestAPI' not found in C:\xampp\htdocs\mmimport\craft\plugins\freshmailintegration\controllers\FreshmailIntegration_EmailController.php on line 27
Is this some kind of namespace issue?