Call to Undefined Method ::init Error I'm getting this error when trying to call my plugin on a template:


  Fatal error: Call to undefined method Craft\SiteUtilitiesService::init() in /path/to/my/site/craft/app/framework/base/CModule.php on line 394


The template tag:

{{ craft.siteUtilities.videoEmbed( block.video, '219181' ) }}

Content of variables/SiteUtilitiesVariable.php:

class SiteUtilitiesVariable
{
    public function videoEmbed($url, $color)
    {
        return craft()-&gt;siteUtilities-&gt;videoEmbed($url, $color);
    }
}


Content of services/SiteUtilitiesService.php:

class SiteUtilitiesService
{
    public function videoEmbed($url, $color)
    {
        // some code to get the video ID from the $url variable

        return "&lt;some html embed code with the $color variable&gt;";
    }
}


What's the init method the error is referencing?
I needed to extend BaseApplicationComponent in my Services file:

class SiteUtilitiesService extends BaseApplicationComponent
{
    public function videoEmbed($url, $color)
    {
        // some code to get the video ID from the $url variable

        return "&lt;some html embed code with the $color variable&gt;";
    }
}