Remove mapper abstract duplication

This commit is contained in:
Dennis Eichhorn 2017-11-08 21:18:31 +01:00
parent f487155a84
commit 67b3a2a1e8
3 changed files with 0 additions and 76 deletions

View File

@ -91,29 +91,4 @@ class CalendarMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $primaryField = 'calendar_id';
/**
* Create object.
*
* @param mixed $obj Object
* @param int $relations Behavior for relations creation
*
* @return mixed
*
* @since 1.0.0
*/
public static function create($obj, int $relations = RelationType::ALL)
{
try {
$objId = parent::create($obj, $relations);
if ($objId === null || !is_scalar($objId)) {
return $objId;
}
} catch (\Exception $e) {
return false;
}
return $objId;
}
}

View File

@ -86,29 +86,4 @@ class EventMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $primaryField = 'calendar_event_id';
/**
* Create object.
*
* @param mixed $obj Object
* @param int $relations Behavior for relations creation
*
* @return mixed
*
* @since 1.0.0
*/
public static function create($obj, int $relations = RelationType::ALL)
{
try {
$objId = parent::create($obj, $relations);
if ($objId === null || !is_scalar($objId)) {
return $objId;
}
} catch (\Exception $e) {
return false;
}
return $objId;
}
}

View File

@ -76,30 +76,4 @@ class ScheduleMapper extends DataMapperAbstract
* @since 1.0.0
*/
protected static $primaryField = 'schedule_id';
/**
* Create object.
*
* @param mixed $obj Object
* @param int $relations Behavior for relations creation
*
* @return mixed
*
* @since 1.0.0
*/
public static function create($obj, int $relations = RelationType::ALL)
{
try {
$objId = parent::create($obj, $relations);
if ($objId === null || !is_scalar($objId)) {
return $objId;
}
} catch (\Exception $e) {
return false;
}
return $objId;
}
}