PHP Classes

File: src/Example/Book.php

Recommend this page to a friend!
  Classes of Mateus Fornari   Hypersistence   src/Example/Book.php   Download  
File: src/Example/Book.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: 9 years ago
Size: 625 bytes
 

Contents

Class file image Download
<?php

/**
 * @table(book)
 */
class Book extends Hypersistence{
   
   
/**
     * @primaryKey
     * @column(id)
     */
   
private $id;
   
   
/**
     * @column(person_id)
     * @manyToOne(lazy)
     * @itemClass(Person)
     */
   
private $author;
   
   
/**
     * @column()
     */
   
private $title;
   
    public function
getId() {
        return
$this->id;
    }

    public function
getAuthor() {
        return
$this->author;
    }

    public function
getTitle() {
        return
$this->title;
    }

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

    public function
setAuthor($author) {
       
$this->author = $author;
    }

    public function
setTitle($title) {
       
$this->title = $title;
    }

}