本文整理汇总了PHP中unknown_type::get方法的典型用法代码示例。如果您正苦于以下问题:PHP unknown_type::get方法的具体用法?PHP unknown_type::get怎么用?PHP unknown_type::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类unknown_type
的用法示例。
在下文中一共展示了unknown_type::get方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: notify
/**
* Notify Event Handler
*
* @param unknown_type $event
* @access public
*/
function notify($event)
{
if ($event->get('visitor_id')) {
$v = owa_coreAPI::entityFactory('base.visitor');
$v->load($event->get('visitor_id'));
if (!$v->wasPersisted()) {
$v->setProperties($event->getProperties());
// Set Primary Key
$v->set('id', $event->get('visitor_id'));
$v->set('first_session_id', $event->get('session_id'));
$v->set('first_session_year', $event->get('year'));
$v->set('first_session_month', $event->get('month'));
$v->set('first_session_day', $event->get('day'));
$v->set('first_session_dayofyear', $event->get('dayofyear'));
$v->set('first_session_timestamp', $event->get('timestamp'));
$v->set('first_session_yyyymmdd', $event->get('yyyymmdd'));
$ret = $v->save();
if ($ret) {
return OWA_EHS_EVENT_HANDLED;
} else {
return OWA_EHS_EVENT_FAILED;
}
} else {
owa_coreAPI::debug("Not updating... Visitor already exists.");
return OWA_EHS_EVENT_HANDLED;
}
} else {
owa_coreAPI::debug("No visitor_id part of event...");
return OWA_EHS_EVENT_HANDLED;
}
}
示例2: notify
/**
* Notify Event Handler
*
* @param unknown_type $event
* @access public
*/
function notify($event)
{
if ($event->get('source')) {
$s = owa_coreAPI::entityFactory('base.source_dim');
$new_id = $s->generateId(trim(strtolower($event->get('source'))));
$s->getByPk('id', $new_id);
$id = $s->get('id');
if (!$id) {
$s->set('id', $new_id);
$s->set('source_domain', $event->get('source'));
$ret = $s->create();
if ($ret) {
return OWA_EHS_EVENT_HANDLED;
} else {
return OWA_EHS_EVENT_FAILED;
}
} else {
owa_coreAPI::debug('Not Persisting. Source already exists.');
return OWA_EHS_EVENT_HANDLED;
}
} else {
owa_coreAPI::debug('Noting to handle. No source properties found on event.');
return OWA_EHS_EVENT_HANDLED;
}
}
示例3: getTransactionList
/**
* (non-PHPdoc)
* @see library/Oara/Network/Oara_Network_Publisher_Interface#getTransactionList($aMerchantIds, $dStartDate, $dEndDate, $sTransactionStatus)
*/
public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
{
$totalTransactions = array();
$urls = array();
$url = "http://www.foxtransfer.eu/index.php?q=prices.en.html&page=affiliate_orders&language=1&basedir=theme2&what=record_time&what=record_time&fy={$dStartDate->toString("yyyy")}&fm={$dStartDate->toString("M")}&fd={$dStartDate->toString("d")}&ty={$dEndDate->toString("yyyy")}&tm={$dEndDate->toString("M")}&td={$dEndDate->toString("d")}";
$urls[] = new Oara_Curl_Request($url, array());
$exportReport = array();
$exportReport = $this->_client->get($urls);
$exportReport = str_replace("<?xml version=\"1.0\" encoding=\"UTF-8\"?>", "", $exportReport);
$dom = new Zend_Dom_Query($exportReport[0]);
$tableList = $dom->query('#tartalom-hatter table[cellspacing="0"][cellpadding="3"][border="0"]');
$exportData = self::htmlToCsv(self::DOMinnerHTML($tableList->current()));
$num = count($exportData);
for ($i = 3; $i < $num; $i++) {
$transactionExportArray = str_getcsv($exportData[$i], ";");
$transaction = array();
$transaction['merchantId'] = 1;
$transaction['unique_id'] = $transactionExportArray[0];
$transaction['date'] = "{$dStartDate->toString("yyyy")}-{$dStartDate->toString("MM")}-01 00:00:00";
if ($transactionExportArray[7] == "Confirmed") {
$transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
} else {
if ($transactionExportArray[7] == "Cancelled") {
$transaction['status'] = Oara_Utilities::STATUS_DECLINED;
} else {
throw new Exception("New status found");
}
}
$transaction['amount'] = Oara_Utilities::parseDouble(preg_replace("/[^0-9\\.,]/", "", $transactionExportArray[10]));
$transaction['commission'] = Oara_Utilities::parseDouble(preg_replace("/[^0-9\\.,]/", "", $transactionExportArray[13]));
$totalTransactions[] = $transaction;
}
return $totalTransactions;
}
示例4: notify
/**
* Notify Event Handler
*
* @param unknown_type $event
* @access public
*/
function notify($event)
{
if ($event->get('ad')) {
$d = owa_coreAPI::entityFactory('base.ad_dim');
$new_id = $d->generateId(trim(strtolower($event->get('ad'))));
$d->getByPk('id', $new_id);
$id = $d->get('id');
if (!$id) {
$d->set('id', $new_id);
$d->set('name', trim(strtolower($event->get('ad'))));
$d->set('type', trim(strtolower($event->get('ad_type'))));
$ret = $d->create();
if ($ret) {
return OWA_EHS_EVENT_HANDLED;
} else {
return OWA_EHS_EVENT_FAILED;
}
} else {
owa_coreAPI::debug('Not Persisting. Ad already exists.');
return OWA_EHS_EVENT_HANDLED;
}
} else {
owa_coreAPI::debug('Noting to handle. No Ad properties found on event.');
return OWA_EHS_EVENT_HANDLED;
}
}
示例5: getTransactionList
/**
* (non-PHPdoc)
* @see library/Oara/Network/Oara_Network_Publisher_Interface#getTransactionList($aMerchantIds, $dStartDate, $dEndDate, $sTransactionStatus)
*/
public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
{
$totalTransactions = array();
$valuesFromExport = array();
$valuesFromExport[] = new Oara_Curl_Parameter('FromDate', $dStartDate->toString("dd/MM/yyyy"));
$valuesFromExport[] = new Oara_Curl_Parameter('ToDate', $dEndDate->toString("dd/MM/yyyy"));
$valuesFromExport[] = new Oara_Curl_Parameter('ReportType', 'dailyReport');
$valuesFromExport[] = new Oara_Curl_Parameter('Link', '-1');
$urls = array();
$urls[] = new Oara_Curl_Request('https://www.bet365affiliates.com/Members/Members/Statistics/Print.aspx?', $valuesFromExport);
$exportReport = $this->_client->get($urls);
$dom = new Zend_Dom_Query($exportReport[0]);
$tableList = $dom->query('#Results');
if (!preg_match("/No results exist/", $exportReport[0])) {
$exportData = self::htmlToCsv(self::DOMinnerHTML($tableList->current()));
$num = count($exportData);
for ($i = 2; $i < $num - 1; $i++) {
$transactionExportArray = str_getcsv($exportData[$i], ";");
$transaction = array();
$transaction['merchantId'] = 1;
$transactionDate = new Zend_Date($transactionExportArray[1], 'dd-MM-yyyy', 'en');
$transaction['date'] = $transactionDate->toString("yyyy-MM-dd HH:mm:ss");
$transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
$transaction['amount'] = Oara_Utilities::parseDouble($transactionExportArray[27]);
$transaction['commission'] = Oara_Utilities::parseDouble($transactionExportArray[32]);
if ($transaction['amount'] != 0 && $transaction['commission'] != 0) {
$totalTransactions[] = $transaction;
}
}
}
return $totalTransactions;
}
示例6: notify
/**
* Notify Event Handler
*
* @param unknown_type $event
* @access public
*/
function notify($event)
{
// create entity
$d = owa_coreAPI::entityFactory('base.document');
// get document id from event
$id = $event->get('document_id');
// if no document_id present attempt to make one from the page_url property
if (!$id) {
$page_url = $event->get('page_url');
if ($page_url) {
$id = $d->generateId($page_url);
} else {
owa_coreAPI::debug('Not persisting Document, no page_url or document_id event property found.');
return OWA_EHS_EVENT_HANDLED;
}
}
$d->load($id);
if (!$d->wasPersisted()) {
$d->setProperties($event->getProperties());
$d->set('url', $event->get('page_url'));
$d->set('uri', $event->get('page_uri'));
$d->set('id', $id);
$ret = $d->create();
if ($ret) {
return OWA_EHS_EVENT_HANDLED;
} else {
return OWA_EHS_EVENT_FAILED;
}
} else {
owa_coreAPI::debug('Not logging Document, already exists');
return OWA_EHS_EVENT_HANDLED;
}
}
示例7: getTransactionList
/**
* (non-PHPdoc)
* @see library/Oara/Network/Oara_Network_Publisher_Interface#getTransactionList($aMerchantIds, $dStartDate, $dEndDate, $sTransactionStatus)
*/
public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
{
$totalTransactions = array();
$urls = array();
$url = 'http://business.skyscanner.net/apiservices/reporting/v1.0/reportdata/' . $dStartDate->toString("yyyy-MM-dd") . '/' . $dEndDate->toString("yyyy-MM-dd") . '?encryptedApiKey=' . $this->_apiKey . "&type=csv";
$urls[] = new Oara_Curl_Request($url, array());
$exportReport = array();
$exportReport = $this->_client->get($urls);
$dump = var_export($exportReport[0], true);
$dump = preg_replace("/ \\. /", "", $dump);
$dump = preg_replace("/\"\\\\0\"/", "", $dump);
$dump = preg_replace("/'/", "", $dump);
$exportData = str_getcsv($dump, "\n");
$num = count($exportData);
for ($i = 1; $i < $num; $i++) {
$transactionExportArray = str_getcsv($exportData[$i], ",");
$transaction = array();
$transaction['merchantId'] = 1;
$transactionDate = new Zend_Date($transactionExportArray[0], 'dd/MM/yyyy HH:mm:ss', 'en');
$transaction['date'] = $transactionDate->toString("yyyy-MM-dd HH:mm:ss");
//unset($transactionDate);
$transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
$transaction['amount'] = (double) $transactionExportArray[9];
$transaction['commission'] = (double) $transaction['amount'] * 0.6;
if ($transaction['amount'] != 0) {
$totalTransactions[] = $transaction;
}
}
return $totalTransactions;
}
示例8: getTransactionList
/**
* (non-PHPdoc)
* @see library/Oara/Network/Oara_Network_Publisher_Interface#getTransactionList($aMerchantIds, $dStartDate, $dEndDate, $sTransactionStatus)
*/
public function getTransactionList($merchantList = null, Zend_Date $dStartDate = null, Zend_Date $dEndDate = null, $merchantMap = null)
{
$folder = realpath(dirname(__FILE__)) . '/../../data/pdf/';
$totalTransactions = array();
$valuesFromExport = array();
$valuesFromExport[] = new Oara_Curl_Parameter('id', "-1");
$valuesFromExport[] = new Oara_Curl_Parameter('yearStart', $dStartDate->toString("yyyy"));
$valuesFromExport[] = new Oara_Curl_Parameter('monthStart', $dStartDate->toString("MM"));
$valuesFromExport[] = new Oara_Curl_Parameter('dayStart', $dStartDate->toString("dd"));
$valuesFromExport[] = new Oara_Curl_Parameter('yearEnd', $dEndDate->toString("yyyy"));
$valuesFromExport[] = new Oara_Curl_Parameter('monthEnd', $dEndDate->toString("MM"));
$valuesFromExport[] = new Oara_Curl_Parameter('dayEnd', $dEndDate->toString("dd"));
$urls = array();
$urls[] = new Oara_Curl_Request('https://partnerprogramma.bol.com/partner/s/excelReport/orders?', $valuesFromExport);
$exportReport = $this->_client->get($urls);
$my_file = $folder . mt_rand() . '.xlsx';
$handle = fopen($my_file, 'w') or die('Cannot open file: ' . $my_file);
$data = $exportReport[0];
fwrite($handle, $data);
fclose($handle);
$objReader = PHPExcel_IOFactory::createReader('Excel2007');
$objReader->setReadDataOnly(true);
$objPHPExcel = $objReader->load($my_file);
$objWorksheet = $objPHPExcel->getActiveSheet();
$highestRow = $objWorksheet->getHighestRow();
$highestColumn = $objWorksheet->getHighestColumn();
$highestColumnIndex = PHPExcel_Cell::columnIndexFromString($highestColumn);
for ($row = 2; $row <= $highestRow; ++$row) {
$transaction = array();
$transaction['unique_id'] = $objWorksheet->getCellByColumnAndRow(0, $row)->getValue() . "_" . $objWorksheet->getCellByColumnAndRow(1, $row)->getValue();
$transaction['merchantId'] = "1";
$transactionDate = new Zend_Date($objWorksheet->getCellByColumnAndRow(2, $row)->getValue(), 'dd-MM-yyyy');
$transaction['date'] = $transactionDate->toString("yyyy-MM-dd 00:00:00");
$transaction['custom_id'] = $objWorksheet->getCellByColumnAndRow(8, $row)->getValue();
if ($objWorksheet->getCellByColumnAndRow(14, $row)->getValue() == 'geaccepteerd') {
$transaction['status'] = Oara_Utilities::STATUS_CONFIRMED;
} else {
if ($objWorksheet->getCellByColumnAndRow(14, $row)->getValue() == 'in behandeling') {
$transaction['status'] = Oara_Utilities::STATUS_PENDING;
} else {
if ($objWorksheet->getCellByColumnAndRow(14, $row)->getValue() == 'geweigerd: klik te oud' || $objWorksheet->getCellByColumnAndRow(14, $row)->getValue() == 'geweigerd') {
$transaction['status'] = Oara_Utilities::STATUS_DECLINED;
} else {
echo "new status " . $objWorksheet->getCellByColumnAndRow(14, $row)->getValue();
}
}
}
$transaction['amount'] = $objWorksheet->getCellByColumnAndRow(11, $row)->getValue();
$transaction['commission'] = $objWorksheet->getCellByColumnAndRow(12, $row)->getValue();
$totalTransactions[] = $transaction;
}
unlink($my_file);
return $totalTransactions;
}
示例9: checkConnection
/**
* Check the connection
*/
public function checkConnection()
{
//If not login properly the construct launch an exception
$connection = false;
$urls = array();
$urls[] = new Oara_Curl_Request('https://portal.ladbrokespartners.com/portal/dashboard.jhtm?currentLanguage=en', array());
$exportReport = $this->_client->get($urls);
if (preg_match("/Logout/", $exportReport[0])) {
$connection = true;
}
return $connection;
}
示例10: checkConnection
/**
* Check the connection
*/
public function checkConnection()
{
//If not login properly the construct launch an exception
$connection = false;
$urls = array();
$urls[] = new Oara_Curl_Request('https://affiliates.affutd.com/affiliates/Dashboard.aspx', array());
$exportReport = $this->_client->get($urls);
$dom = new Zend_Dom_Query($exportReport[0]);
$results = $dom->query('.lnkLogOut');
if (count($results) > 0) {
$connection = true;
}
return $connection;
}
示例11: checkConnection
/**
* Check the connection
*/
public function checkConnection()
{
//If not login properly the construct launch an exception
$connection = true;
$urls = array();
$urls[] = new Oara_Curl_Request('https://www.winneraffiliates.com/', array());
$exportReport = $this->_client->get($urls);
$dom = new Zend_Dom_Query($exportReport[0]);
$results = $dom->query('#lgUsername');
if (count($results) > 0) {
$connection = false;
}
return $connection;
}
示例12: getPaymentHistory
/**
* (non-PHPdoc)
* @see Oara/Network/Oara_Network_Publisher_Base#getPaymentHistory()
*/
public function getPaymentHistory()
{
$paymentHistory = array();
$urls = array();
$urls[] = new Oara_Curl_Request('http://affiliates.mypcbackup.com/paychecks', array());
$exportReport = $this->_client->get($urls);
$dom = new Zend_Dom_Query($exportReport[0]);
$tableList = $dom->query('.transtable');
if ($tableList->current() != null) {
$exportData = self::htmlToCsv(self::DOMinnerHTML($tableList->current()));
$num = count($exportData);
for ($i = 1; $i < $num; $i++) {
$paymentExportArray = str_getcsv($exportData[$i], ";");
try {
$obj = array();
$date = new Zend_Date($paymentExportArray[14], "MM/dd/yyyy");
$obj['date'] = $date->toString("yyyy-MM-dd HH:mm:ss");
$obj['pid'] = preg_replace("/[^0-9\\.,]/", "", $paymentExportArray[14]);
$obj['method'] = $paymentExportArray[16];
$value = preg_replace("/[^0-9\\.,]/", "", $paymentExportArray[12]);
$obj['value'] = Oara_Utilities::parseDouble($value);
$paymentHistory[] = $obj;
} catch (Exception $e) {
echo "Payment failed\n";
}
}
}
return $paymentHistory;
}
示例13: getPaymentHistory
/**
* (non-PHPdoc)
* @see Oara/Network/Oara_Network_Base#getPaymentHistory()
*/
public function getPaymentHistory()
{
$paymentHistory = array();
$urls = array();
$urls[] = new Oara_Curl_Request('https://publisher.ebaypartnernetwork.com/PublisherAccountPaymentHistory', array());
$exportReport = $this->_client->get($urls);
$dom = new Zend_Dom_Query($exportReport[0]);
$results = $dom->query('table .aruba_report_table');
if (count($results) > 0) {
$exportData = self::htmlToCsv(self::DOMinnerHTML($results->current()));
for ($j = 1; $j < count($exportData); $j++) {
$paymentExportArray = str_getcsv($exportData[$j], ";");
$obj = array();
$paymentDate = new Zend_Date($paymentExportArray[0], "dd/MM/yy", "en");
$obj['date'] = $paymentDate->toString("yyyy-MM-dd HH:mm:ss");
$obj['pid'] = $paymentDate->toString("yyyyMMdd");
$obj['method'] = 'BACS';
if (preg_match("/[-+]?[0-9]*,?[0-9]*\\.?[0-9]+/", $paymentExportArray[2], $matches)) {
$obj['value'] = Oara_Utilities::parseDouble($matches[0]);
} else {
throw new Exception("Problem reading payments");
}
$paymentHistory[] = $obj;
}
}
return $paymentHistory;
}
示例14: getPaymentHistory
/**
* (non-PHPdoc)
* @see Oara/Network/Oara_Network_Publisher_Base#getPaymentHistory()
*/
public function getPaymentHistory()
{
$paymentHistory = array();
foreach ($this->_idBox as $id) {
$urls = array();
$paymentExport = array();
$paymentExport[] = new Oara_Curl_Parameter('idbox_store_id', $id);
$urls[] = new Oara_Curl_Request($this->_networkServer . "/gp/associates/network/your-account/payment-history.html?", $paymentExport);
$exportReport = $this->_client->get($urls);
$dom = new Zend_Dom_Query($exportReport[0]);
$results = $dom->query('.paymenthistory');
$count = count($results);
$yearArray = array();
if ($count == 1) {
$paymentTable = $results->current();
$paymentReport = self::htmlToCsv(self::DOMinnerHTML($paymentTable));
for ($i = 2; $i < count($paymentReport) - 1; $i++) {
$paymentExportArray = str_getcsv($paymentReport[$i], ";");
$obj = array();
$paymentDate = new Zend_Date($paymentExportArray[0], "M d yyyy", "en");
$obj['date'] = $paymentDate->toString("yyyy-MM-dd HH:mm:ss");
$obj['pid'] = $paymentDate->toString("yyyyMMdd") . substr((string) base_convert(md5($id), 16, 10), 0, 5);
$obj['method'] = 'BACS';
if (preg_match("/[0-9]*,?[0-9]*\\.?[0-9]+/", $paymentExportArray[4], $matches)) {
$obj['value'] = Oara_Utilities::parseDouble($matches[0]);
$paymentHistory[] = $obj;
}
}
} else {
//throw new Exception('Problem getting the payments');
}
}
return $paymentHistory;
}
示例15: getExportUser
/**
* Sets up the merchant list and the program list.
*/
private function getExportUser()
{
$exporUser = null;
$urls = array();
$urls[] = new Oara_Curl_Request($this->_serverUrl . 'Reports/Default.aspx?', array(new Oara_Curl_Parameter('report', 'Performance')));
$result = $this->_client->get($urls);
$urls = array();
$urls[] = new Oara_Curl_Request($this->_serverUrl . '/Reports/RemoteHelp.aspx?', array());
$result = $this->_client->get($urls);
/*** load the html into the object ***/
$doc = new DOMDocument();
libxml_use_internal_errors(true);
$doc->validateOnParse = true;
$doc->loadHTML($result[0]);
$textareaList = $doc->getElementsByTagName('textarea');
$messageNode = $textareaList->item(0);
if (!isset($messageNode->firstChild)) {
throw new Exception('Error getting the User');
}
$messageStr = $messageNode->firstChild->nodeValue;
$parseUrl = parse_url(trim($messageStr));
$parameters = explode('&', $parseUrl['query']);
foreach ($parameters as $parameter) {
$parameterValue = explode('=', $parameter);
if ($parameterValue[0] == 'user') {
$exporUser = $parameterValue[1];
}
}
return $exporUser;
}