<?php
|
namespace JVBase\integrations;
|
|
use Exception;
|
|
if (!defined('ABSPATH')) {
|
exit;
|
}
|
|
trait SyncFrom {
|
use SyncHelpers;
|
/**
|
* @param array $itemData
|
* @return bool
|
* @throws Exception
|
*/
|
protected function createItemFromService(array $itemData):bool
|
{
|
throw new Exception('createItemFromService must be implemented by child class '.$this->service_name);
|
}
|
|
/**
|
* @param array $itemData
|
* @return bool
|
* @throws Exception
|
*/
|
protected function updateItemFromService(array $itemData):bool
|
{
|
throw new Exception('updateItemFromService must be implemented by child class '.$this->service_name);
|
}
|
|
/**
|
* @param array $itemData
|
* @return bool
|
* @throws Exception
|
*/
|
protected function deleteItemFromService(array $itemData):bool
|
{
|
throw new Exception('deleteItemFromService must be implemented by child class '.$this->service_name);
|
}
|
}
|