Welcome Guest, Not a member yet? Register   Sign In
Extending Datamapper
#1

[eluser]GregX999[/eluser]
Hey guys,

I'm using DataMapper and I have a few methods that I find myself placing in every, or almost every model. So I wanted to create a class (ie: DataMapperExtra) that extends DataMapper, and contains those methods. But if I do that, I get an error that DataMapper can't find the database table "datamapperextras".

As soon as I saw that error, I understood what was going on. But is there a way to "extend" the DataMapper class without using "extends DataMapper"? I really don't want to have to include the same code over and over in my models, nor do I want to edit the main DataMapper.php file.

Greg


Messages In This Thread
Extending Datamapper - by El Forum - 08-03-2011, 10:52 AM
Extending Datamapper - by El Forum - 08-03-2011, 11:11 AM
Extending Datamapper - by El Forum - 08-03-2011, 11:26 AM
Extending Datamapper - by El Forum - 08-03-2011, 12:30 PM
Extending Datamapper - by El Forum - 08-03-2011, 10:43 PM
Extending Datamapper - by El Forum - 08-04-2011, 02:29 AM



Theme © iAndrew 2016 - Forum software by © MyBB