public function deprecatedUsageWithNamespace() { $app = new ApplicationType(); $this->assertEquals(Marshaller::marshal($app), $this->fixture->marshalTo(new Node('ApplicationType'), $app)->getSource(INDENT_DEFAULT)); }
<?php require_once 'config.php'; $paymentId = $_REQUEST['paymentId']; $version = $_REQUEST['version']; $paymentFile = realpath(DIR_REPOSITORY . '/' . $paymentId); $output = null; //Logger::debug("Checking repository {1} for payment's {1} data newer then {2}", $paymentFile, $paymentId, $version); if (dirname($paymentFile) == DIR_REPOSITORY && file_exists($paymentFile)) { $data = unserialize(file_get_contents($paymentFile)); if (!empty($data) && is_array($data) && array_key_exists('version', $data) && array_key_exists('data', $data)) { $currentDataVersion = $data['version']; Logger::debug("Version in repository ({0}):\r\n{1}", $currentDataVersion, $data); if ($currentDataVersion > $version) { $output = $data['data']; } } } // Marshaller class is defined in 'Marshaller.class.php' and is included with whole InviPayApi. // It provides marshalling of POPO's into JSON representation $marshaller = new Marshaller(); $output = $marshaller->marshall($output); Logger::trace("Output: {0}", $output); die($output);