Skip to content

gouthamvel/active-record-php

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This is a simple ActiveRecord implementation for PHP 5.3.


Depends on:

* PHP 5.3.2
* PECL PDO
* MySQL 5+

Modify test.php to suite your local PHP install. The sample DB dump is provided as test.sql.

Expected output of test.php:
Name:-LovesArray
(
    [0] => User Object
        (
            [association_key:protected] => has_many
            [row:protected] => Array
                (
                    [id] => 1
                    [user_name] => Loves
                )

        )

)
Array
(
    [0] => Photo Object
        (
            [association_key:protected] => belongs_to
            [row:protected] => Array
                (
                    [id] => 1
                    [user_id] => 1
                )

        )

)


Changes:
2010-10-29: Updated to work with PHP 5.3.2

About

This is a POC clone of Rails' active_record in PHP 5.3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%