PHP Classes

File: tests/Model/User.php

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

Contents

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

use
Nkey\Caribu\Model\AbstractModel;

/**
 * Annotated user model
 *
 * This class is part of Caribu package
 *
 * @author Maik Greubel <greubel@nkey.de>
 *
 * @table user
 * @entity
 */
class User extends AbstractModel
{
   
/**
     * @id
     * @column uid
     * @var int
     */
   
private $id;

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

   
/**
     *
     * @var string
     */
   
private $email;

   
/**
     *
     * @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 getEmail()
    {
        return
$this->email;
    }

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