PHP Classes

File: tests/Model/Book.php

Recommend this page to a friend!
  Classes of Maik Greubel   Caribu ORM   tests/Model/Book.php   Download  
File: tests/Model/Book.php
Role: Unit test script
Content type: text/plain
Description: Another unit test model
Class: Caribu ORM
Map objects to databases records using annotations
Author: By
Last change: Strong type and documentation fixes
Date: 6 years ago
Size: 1,635 bytes
 

Contents

Class file image Download
<?php
namespace Nkey\Caribu\Tests\Model;

use \
Nkey\Caribu\Model\AbstractModel;
use \
Nkey\Caribu\Tests\Model\Author;

/**
 * @table books
 * @entity
 * @cascade
 */
class Book extends AbstractModel
{
   
/**
     * @id
     * @column id
     * @var int
     */
   
private $id;

   
/**
     * @column name
     * @var string
     */
   
private $name;

   
/**
     * @column summary;
     * @var string
     */
   
private $summary;

   
/**
     * @column authorid
     * @var Author
     */
   
private $author;

   
/**
     *
     * @return int
     */
   
public function getId()
    {
        return
$this->id;
    }

   
/**
     *
     * @param
     * $id
     */
   
public function setId($id)
    {
       
$this->id = $id;
        return
$this;
    }

   
/**
     *
     * @return string
     */
   
public function getName()
    {
        return
$this->name;
    }

   
/**
     *
     * @param
     * $name
     */
   
public function setName($name)
    {
       
$this->name = $name;
        return
$this;
    }

   
/**
     *
     * @return string
     */
   
public function getSummary()
    {
        return
$this->summary;
    }

   
/**
     *
     * @param
     * $summary
     */
   
public function setSummary($summary)
    {
       
$this->summary = $summary;
        return
$this;
    }

   
/**
     *
     * @return Author
     */
   
public function getAuthor()
    {
        return
$this->author;
    }

   
/**
     *
     * @param Author $author
     */
   
public function setAuthor(Author $author)
    {
       
$this->author = $author;
        return
$this;
    }
}