DB.PHP - PHP ORM

Set on create function

As class handler initializes empty object first of his class and than fills its properties with values there is difficult to write some catchy initialization code in class constructor.

Therefore after filling properties with values class handler calls $object->create() function if such exists. So if you want to do something after object is created than create function is for you.

Example:

class user
{
    public $id;
    public $name;
    public function create ()
    {
        echo "an user was just created and filled by db.php";
    }
}