Any interest in an ORM module? (Propel/ActiveRecord)

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply

Would you use a PropelOrm module integrating an ORM into CMSMS

Yes
1
33%
No
2
67%
 
Total votes: 3

drmikecrowe
Forum Members
Forum Members
Posts: 23
Joined: Sun Sep 20, 2009 1:22 pm

Any interest in an ORM module? (Propel/ActiveRecord)

Post by drmikecrowe »

Hi folks,

I had a need for an ORM (well, specifically a database-driven tree structure), and I'm a huge fan of Propel (http://www.propelorm.org/).

I've just managed to prototype a module that integrates Propel with CMSMS (1.11.1, but should work on 1.10.x too). This would allow you to do things like (with no new imports):

Code: Select all

		$user = new CmsUsers();
		$user->setUsername("drmikecrowe");
		$user->setPassword($password);
		$user->setAdminAccess(1);
		$user->setFirstName("Mike");
		$user->setLastName("Crowe");
		$user->setActive(1);
		$user->setEmail("mail@domain.com");
		$user->save();
and

Code: Select all

$users = CmsUsersQuery::create()->filterByActive(1)->orderByCreateDate()->find();
Caution: The paint is very wet, and I probably need a week or so to finalize this and massage it into something that might be testable.

LMK, by answering the poll, if there is any interest in this.

TIA
Mike
Post Reply

Return to “Developers Discussion”