PHP Classes

File: tests/Model/Author.php

Recommend this page to a friend!
  Classes of Maik Greubel   Caribu ORM   tests/Model/Author.php   Download  
File: tests/Model/Author.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: 7 years ago
Size: 844 bytes
 

Contents

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

use
Nkey\Caribu\Model\AbstractModel;

/**
 * @table authors
 * @entity
 */
class Author extends AbstractModel
{
   
/**
     * @id
     * @column id
     * @var int
     */
   
private $id;

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

   
/**
     *
     * @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;
    }
}