本文整理汇总了PHP中CF7DBPlugin::getErrorLog方法的典型用法代码示例。如果您正苦于以下问题:PHP CF7DBPlugin::getErrorLog方法的具体用法?PHP CF7DBPlugin::getErrorLog怎么用?PHP CF7DBPlugin::getErrorLog使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CF7DBPlugin
的用法示例。
在下文中一共展示了CF7DBPlugin::getErrorLog方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: saveFormData
public function saveFormData($form_id)
{
try {
$title = get_the_title($form_id);
$converter = new CFDBPostDataConverter();
$converter->addExcludeField('post_nonce_field');
$converter->addExcludeField('form-type');
$converter->addExcludeField('fms-ajax');
$converter->addExcludeField('action');
$data = $converter->convert($title);
// CFDBPostDataConverter won't capture files how they are organized here
if (is_array($_FILES) && !empty($_FILES)) {
foreach ($_FILES as $key => $file) {
if (is_array($file['tmp_name'])) {
for ($idx = 0; $idx < count($file['tmp_name']); ++$idx) {
if (is_uploaded_file($file['tmp_name'][$idx])) {
$fileKey = $idx > 0 ? $key . $idx : $key;
$data->posted_data[$fileKey] = $file['name'][$idx];
$data->uploaded_files[$fileKey] = $file['tmp_name'][$idx];
}
}
}
}
}
return $this->plugin->saveFormData($data);
} catch (Exception $ex) {
$this->plugin->getErrorLog()->logException($ex);
}
return true;
}
示例2: saveFormData
/**
* @param $form_data
* @return bool
*/
public function saveFormData($form_data) {
try {
$data = $this->convertData($form_data);
return $this->plugin->saveFormData($data);
} catch (Exception $ex) {
$this->plugin->getErrorLog()->logException($ex);
}
return true;
}
示例3: saveFormData
/**
* @param $dataForms array
* @param $postID array
* @param $post array
* @param $submissionsData array
* @param $dataContentEmail array
* @param $nameFileByIdentifier array
* @param $requiredField array
* @param $fileAttach array
* @return bool
*/
public function saveFormData($dataForms, $postID, $post, $submissionsData, $dataContentEmail, $nameFileByIdentifier, $requiredField, $fileAttach)
{
try {
$data = $this->convertData($dataForms, $postID, $post, $submissionsData, $dataContentEmail, $nameFileByIdentifier, $requiredField, $fileAttach);
return $this->plugin->saveFormData($data);
} catch (Exception $ex) {
$this->plugin->getErrorLog()->logException($ex);
}
return true;
}
示例4: saveFormData
/**
* @param $post_id int
* @param $all_values array
* @param $extra_values array
* @return object
*/
public function saveFormData($post_id, $all_values, $extra_values)
{
try {
$data = $this->convertData($post_id, $all_values);
return $this->plugin->saveFormData($data);
} catch (Exception $ex) {
$this->plugin->getErrorLog()->logException($ex);
}
return true;
}
示例5: saveVssfFormData
/**
* Very Simple Signup Form
* @param $form_data
* @return bool
*/
public function saveVssfFormData($form_data)
{
try {
$title = 'Very Simple Signup Form';
$data = $this->convertData($form_data, $title);
return $this->plugin->saveFormData($data);
} catch (Exception $ex) {
$this->plugin->getErrorLog()->logException($ex);
}
return true;
}
示例6: saveFormData
/**
* @param $form array
* @param $referrer array
* @param $process_id string
* @return bool
*/
public function saveFormData($form, $referrer, $process_id)
{
try {
// debug
// $this->plugin->getErrorLog()->log('$form: ' . print_r($form, true));
// $this->plugin->getErrorLog()->log('$referrer: ' . print_r($referrer, true));
// $this->plugin->getErrorLog()->log('$process_id: ' . print_r($process_id, true));
// global $processed_data;
// $this->plugin->getErrorLog()->log('$processed_data: ' . print_r($processed_data, true));
$data = $this->convertData($form);
return $this->plugin->saveFormData($data);
} catch (Exception $ex) {
$this->plugin->getErrorLog()->logException($ex);
}
return true;
}
示例7: saveFormData
/**
* @param $form array
* @param $referrer array
* @param $process_id string
* @param int $entry_id
* @return bool
*/
public function saveFormData($form, $referrer, $process_id, $entry_id)
{
if (!class_exists('Caldera_Forms')) {
// Caldera not installed
return true;
}
try {
// debug
// $this->plugin->getErrorLog()->log('$form: ' . print_r($form, true));
// $this->plugin->getErrorLog()->log('$referrer: ' . print_r($referrer, true));
// $this->plugin->getErrorLog()->log('$process_id: ' . print_r($process_id, true));
// $this->plugin->getErrorLog()->log('$entry_id: ' . print_r($entry_id, true));
$data = $this->convertData($form, $entry_id);
return $this->plugin->saveFormData($data);
} catch (Exception $ex) {
$this->plugin->getErrorLog()->logException($ex);
}
return true;
}
示例8: saveFormData
public function saveFormData($bool, $new_post, $form_params)
{
// $msg = '$new_post=' . print_r($new_post, true) . "\n" .
// '$form_params=' . print_r($form_params, true);
// $this->plugin->getErrorLog()->log($msg);
try {
if (is_array($new_post)) {
$postedData = array();
foreach ($new_post as $key => $value) {
$postedData[$key] = urldecode($value);
}
$title = 'Enfold';
if (is_array($form_params) && isset($form_params['heading']) && $form_params['heading']) {
$title = strip_tags($form_params['heading']);
}
$data = (object) array('title' => $title, 'posted_data' => $postedData, 'uploaded_files' => array());
$this->plugin->saveFormData($data);
}
} catch (Exception $ex) {
$this->plugin->getErrorLog()->logException($ex);
}
return true;
}
示例9: generateSubmitTimeForCF7
/**
* Generate the submit_time and submit_url so they can be added to CF7 mail
* @param $posted_data array
* @return array
*/
public function generateSubmitTimeForCF7($posted_data)
{
try {
$time = $this->plugin->generateSubmitTime();
$posted_data['submit_time'] = $time;
// No longer generating submit_url because it seems to cause CF7 to think it is
// a spam submission and it drops it.
// $url = get_admin_url() . sprintf('admin.php?page=%s&submit_time=%s',
//
// $this->getDBPageSlug(),
// $time);
// $posted_data['submit_url'] = $url;
} catch (Exception $ex) {
$this->plugin->getErrorLog()->logException($ex);
}
return $posted_data;
}