Skip to content

Instantly share code, notes, and snippets.

@fabriziomachado
Created September 26, 2011 20:10
Show Gist options
  • Save fabriziomachado/1243266 to your computer and use it in GitHub Desktop.
Save fabriziomachado/1243266 to your computer and use it in GitHub Desktop.
application/models/Student.php
<?php
class Student extends Person {
static $primary_key = 'id';
static $has_many = array(array('enrollments'));
public function __construct(array $attributes = array()) {
parent::__construct(array_merge($attributes,array('type'=> __CLASS__ )));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment