Currently FeedAPI Mapper seems to be able utilize .inc files only from feedapi_mapper/mappers directory, see _feedapi_mapper_load_mappers()
This patch allows other modules to encapsulate mappers. The rule is that the mapper inc files should be put into /modulname/mappers/ directory and the file ending should be .inc
After this is committed, #368561: Mapper for FeedAPI URL/GUID will work.

Comments

alex_b’s picture

But this can already be done by adding a hook_feedapi_mapper() implementation to the .module file, right? What additional benefit has this?

aron novak’s picture

With this, it's possible to store set of mappers in other modules, not only in feedapi_mapper.
First, i like the idea of storing the mappers outside of the .module files. Maybe not the same, but tests are also not inside the .module files.
Second, i think it may happend that you want a mapper for a module, but you do not want to mess up the module's source code and you want to use the original source code for feedapi_mapper as well. This structure means bigger flexibility, isn't it?

Also it seems to be a fashion to move out as much code as possible from .module files. :)

aron novak’s picture

Title: Ability to use mappers from other modules » [accidentally committed] Ability to use mappers from other modules
Priority: Normal » Critical

ok, let's consider to remove these changes from the CVS before FeedAPI mapper 2.0 beta 1

alex_b’s picture

Status: Needs review » Needs work

Yeah, let's remove this. needs a patch : )

aron novak’s picture

Status: Needs work » Postponed

#4: the patch is in the initial post.
However i removed the change from the code.

aron novak’s picture

Priority: Critical » Normal
alex_b’s picture

Title: [accidentally committed] Ability to use mappers from other modules » Ability to use mappers from other modules

We can remove [accidentally committed] then, right?