mirror of
https://github.com/Karaka-Management/oms-ClientManagement.git
synced 2026-01-23 21:28:40 +00:00
Remove mapper abstract duplication
This commit is contained in:
parent
ef44c66050
commit
5e7d4ca879
|
|
@ -95,45 +95,4 @@ class ClientMapper extends DataMapperAbstract
|
|||
'src' => 'clientmgmt_client_contactelement_src',
|
||||
],
|
||||
];
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get object.
|
||||
*
|
||||
* @param mixed $primaryKey Key
|
||||
* @param int $relations Load relations
|
||||
* @param mixed $fill Object to fill
|
||||
*
|
||||
* @return Client
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public static function get($primaryKey, int $relations = RelationType::ALL, $fill = null)
|
||||
{
|
||||
return parent::get($primaryKey, $relations, $fill);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user