this started on #595930: from github to d.o cvs(aka start 6.x-2.0-dev and get access):
sdboyer quote:
db6c81d9bda5568a254f4564889ed70762db9b6c - I wouldn't be opposed to some simple wrapper helper functions to make some of this less ugly. f.e., take:
$vcs_account = new $repository->backend->classes['account']($username, $uid, $repository);
and turn it into:
$vcs_account = versioncontrol_get_account($repository, $username, $uid);
and versioncontrol_get_account() function could probably be just a one or two-line wrapper.
Maybe the main problem here is that we need to use a value inside the repository object to call the right class name. And using a function in *.module from includes/* is what I want to avoid to dependency problems.
So, before implementing something here, I need some suggestion about how to do it in the right way.
Comments
Comment #1
marvil07 commentedSince entities patch now we use:
and backend class is the responsible of the creation, so closing this because I see an improvement on readability here ;-)