*/ trait FilterTrait { public function getFieldPropertySnake(string $fieldName): string { return str_replace('.', '_', $fieldName); } public function getFieldPropertyBase(string $fieldName): string { return str_replace('_', '.', $fieldName); } public function isRelationField(string $fieldName, string $needle = "."): bool { return strpos($fieldName, $needle) !== false; } public function getFieldPropertyWithoutRelation(string $fieldName, string $needle = '.'): string { return substr($fieldName, strpos($fieldName, $needle) + 1); } public function getFieldPropertyRelationAlias(string $fieldName, string $needle = '.'): string { return substr($fieldName, 0, strpos($fieldName, $needle)); } }