Skip to content

Instantly share code, notes, and snippets.

@tristanlins
Last active December 20, 2015 22:19
Show Gist options
  • Save tristanlins/6204376 to your computer and use it in GitHub Desktop.
Save tristanlins/6204376 to your computer and use it in GitHub Desktop.
[Avisota 2 Example] how to use the dependency injection container
<?php
global $container;
// access the avisota subscription manager
/** @var \Avisota\Contao\SubscriptionManager $subscriptionManager */
$subscriptionManager = $container['avisota.subscription'];
// subscribe global
$subscriptionManager->subscribe('me@example.com');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment