private function getId($model)
{
// Check to see if we can get an id via our defined methods
foreach (self::$methods as $method) {
if (method_exists($model, $method) && is_callable([$model, $method])) {
return $model->{$method}();
}
}
// Check to see if we can get an id via our defined properties
foreach (self::$properties as $property) {
if (isset($model->{$property})) {
return $model->{$property};
}
}
}