protected static function _generateClassMethods($class, $layer = null)
{
$result = [];
if (!class_exists($class)) {
throw new MissingImplementationException("Unexisting class `{$class}`");
}
$result = static::_generateAbstractMethods($class);
if ($layer === false) {
return $result;
}
$reflection = Inspector::inspect($class);
if (!$layer && !$reflection->isInternal()) {
return $result;
}
$finals = $reflection->getMethods(ReflectionMethod::IS_FINAL);
$methods = array_diff($reflection->getMethods(ReflectionMethod::IS_PUBLIC), $finals);
foreach ($methods as $method) {
$result[$method->getName()] = static::_generateMethod($method, true);
}
return $result;
}