PHP Classes

File: examples/orm/UserMapper.php

Recommend this page to a friend!
  Classes of Haseeb Ahmad Basil   PHP Skeleton Framework   examples/orm/UserMapper.php   Download  
File: examples/orm/UserMapper.php
Role: Example script
Content type: text/plain
Description: Example script
Class: PHP Skeleton Framework
Extensive Web application development framework
Author: By
Last change:
Date: 8 years ago
Size: 381 bytes
 

Contents

Class file image Download
<?php

#require_once('HardcodedGateway.php');

class UserMapper extends HardcodedGateway {

    public function
__construct($db) {
       
parent::__construct($db, 'User','users');
       
$this->mapMethods('getId','setId')->toColumn('id')->setKey();
       
$this->mapMethods('getName','setName')->toColumn('first_name'); // should we allow a way to concatenate columns? ie 'first_name lastname'
   
}

}