modX::getService
Load and return a named service class instance.
Syntax
API Doc: http://api.modxcms.com/xpdo/xPDO.html#methodgetService
object getService (string $name, [string $class = ''], [string $path = ''], [array $params = array ()])
Examples
Get the modSmarty service.
$modx->getService('smarty','smarty.modSmarty');
Get a custom, user-defined service called 'modTwitter' from a custom path ('/path/to/modtwitter.class.php'), and pass in some custom parameters.
$modx->getService('twitter','modTwitter','/path/to/',array(
'api_key' => 3212423,
));
$modx->twitter->tweet('Success!');