###Magento 1.x:
Mage::dispatchEvent($eventName, $data);
###Magento 2:
/**
* @param string $eventName
* @param array(string => mixed) $data
* @return void
*/
function df_dispatch($eventName, array $data = []) {
/** @var \Magento\Framework\ObjectManagerInterface $om */
$om = \Magento\Framework\App\ObjectManager::getInstance();
/** @var \Magento\Framework\Event\ManagerInterface $manager */
$manager = $om->get('Magento\Framework\Event\ManagerInterface');
$manager->dispatch($eventName, $data);
}