I'm trying to build my first plugin using a service but i can't seem to get it to work.
The file is named CampaignReports_CampaignMonitorService.php and it's in the services folder of my plugin.
This is the code of the service:
class CampaignReports_CampaignMonitorService extends BaseApplicationComponent
{
public function __construct()
{
}
public function getSettings()
{
return true;
}
}
I'm calling the service as follow:
craft()->campaignReports_CampaignMonitor->getSettings();
This causes an internal server error with the following message:
Internal Server Error
Property "Craft\WebApp.campaignReports_CampaignMonitor" is not defined.
Any idea what i'm doing wrong? Probably some naming convention I haven't followed exactly but I just don't find it