Last active
August 29, 2015 13:56
-
-
Save danielholmstrom/9253130 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
interface ExportLogger { | |
function info(); | |
function debug(); | |
function warning(); | |
function error(); | |
function fatal(); | |
} | |
class Made_Integration_Model_Export implements ExportLogger | |
{ | |
function info(); | |
function debug(); | |
function warning(); | |
function error(); | |
function fatal(); | |
public function export($type, $object, $data = null) | |
{ | |
$adapters = Mage::helper('integration')->getExportAdapters(); | |
if (empty($adapters)) { | |
return false; | |
} | |
foreach ($adapters as $adapter) { | |
try { | |
$adapter->export($type, $object, $data, $this); | |
$this->registerExportNotification($type, $adapter, $object, $data); | |
} catch (Exception $e) { | |
$this->registerFailureNotification($type, $adapter, $object, $data, $e); | |
} | |
} | |
} | |
} | |
interface ExportAdapterInterface { | |
function export($type, $object, $data, $logger); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment