File: src/Example/Course.php

Recommend this page to a friend!
  Classes of Mateus Fornari  >  Hypersistence  >  src/Example/Course.php  >  Download  
File: src/Example/Course.php
Role: Example script
Content type: text/plain
Description: Example script
Class: Hypersistence
Store and retrieve objects in databases using PDO
Author: By
Last change:
Date: 6 years ago
Size: 802 bytes
 

 

Contents

Class file image Download
<?php
/**
 * @table(course)
 */
class Course extends Hypersistence{
   
/**
     * @primaryKey
     */
   
private $id;
   
/**
     * @column()
     */
   
private $description;
   
   
/**
     * @manyToMany(eager)
     * @joinTable(student_has_course)
     * @joinColumn(course_id)
     * @inverseJoinColumn(student_id)
     * @itemClass(Student)
     */
   
private $students;
   
   
    public function
getId() {
        return
$this->id;
    }

    public function
getDescription() {
        return
$this->description;
    }

    public function
setId($id) {
       
$this->id = $id;
    }

    public function
setDescription($description) {
       
$this->description = $description;
    }

    public function
getStudents() {
        return
$this->students;
    }
   
    public function
setStudents($students) {
       
$this->students = $students;
    }

}
?>


For more information send a message to info at phpclasses dot org.