PHP Classes

File: ExampleObject2.php

Recommend this page to a friend!
  Classes of Indrek Altpere   ORM mapping class(like Hibernate), maps database table rows to objects   ExampleObject2.php   Download  
File: ExampleObject2.php
Role: Class source
Content type: text/plain
Description: Another example object
Class: ORM mapping class(like Hibernate), maps database table rows to objects
Store and retrieve objects in MySQL table records
Author: By
Last change: Return was missing in ById
Date: 7 years ago
Size: 398 bytes
 

Contents

Class file image Download
<?php
class ExampleObject2 extends BaseObject {
    public function
IdField() {
        return
'example2id';
    }
    public function
GetTableName() {
        return
'exampleobjects2';
    }
    public static function
ById($id) {
        return
self::GetById($id, __CLASS__);
    }
    public function
GetExample() {
        return
ExampleObject::ById($this->example_id);
    }
}
?>