Creating a php ORM Mapper

For the discussion of Perl, Python, Ruby, and PHP and other interpreted languages.

Creating a php ORM Mapper

Post by midget214 on Thu Feb 04, 2010 5:16 am
([msg=34455]see Creating a php ORM Mapper[/msg])

Hi All

I have been working in php for 6 months now, and I feel ready to tackle a framework of my own.

I have started creating the ORM mapper, but I need someone to check the code for me, and tell me if I am on the right track, or if something can be done in a better way.

I know there are a few great frameworks out there already, but this is just a project to learn the ins and outs of php.

The source code can be found here

There is a zip file called

The ORM is still in it's very early stage, but its working as it should so far (although there are some bugs in there).

For the ORM to work, you will need to create a MySQL database and create a table in there called usertypes (You can always change this, but you will need to change the mappings in the TestObject as well then).

My usertypes table has 2 fields

id [int] and code [varchar(50)]

I really hope someone can help me :)

If anyone needs some more info on this project, please feel free to contact me and I wil try and explain what I have done.

Many Thanks and Regards
User avatar
New User
New User
Posts: 1
Joined: Thu Feb 04, 2010 4:58 am
Blog: View Blog (0)

Re: Creating a php ORM Mapper

Post by thetan on Mon Feb 08, 2010 4:38 pm
([msg=34686]see Re: Creating a php ORM Mapper[/msg])

Wow, that's pretty damn good for something in it's early stages. I personally wouldn't use it myself (out of personal style preference), as I've always been more off an MVC type of guy in terms of web apps. I'd tend to reserve ORM for things that are more stand alone app like myself. But if ORM is what gets your engines rev'd then keep it up because what you got now is pretty damn good.
"If art interprets our dreams, the computer executes them in the guise of programs!" - SICP


“If at first, the idea is not absurd, then there is no hope for it” - Albert Einstein
User avatar
Posts: 657
Joined: Thu Dec 17, 2009 6:58 pm
Location: Various Bay Area Cities, California
Blog: View Blog (0)

Return to Interpreted Languages

Who is online

Users browsing this forum: No registered users and 0 guests