Location: PHPKode > projects > MongoDB Object Document Mapper > tests/Documents/BaseEmployee.php
<?php

namespace Documents;

/** @MappedSuperclass */
abstract class BaseEmployee
{
    /** @Id */
    protected $id;

    /** @Increment */
    protected $changes = 0;

    /** @Collection */
    protected $notes = array();

    /** @String */
    protected $name;

    /** @Float */
    protected $salary;

    /** @Date */
    protected $started;

    /** @Date */
    protected $left;

    /** @EmbedOne(targetDocument="Address") */
    protected $address;

    public function getId()
    {
        return $this->id;
    }

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

    public function getChanges()
    {
        return $this->changes;
    }

    public function incrementChanges($num)
    {
        $this->changes = $this->changes + $num;
        return $this;
    }

    public function getNotes()
    {
        return $this->notes;
    }

    public function addNote($note)
    {
        $this->notes[] = $note;
        return $this;
    }

    public function getName()
    {
        return $this->name;
    }

    public function setName($val)
    {
        $this->name = $val;
        return $this;
    }

    public function getSalary()
    {
        return $this->salary;
    }

    public function setSalary($val)
    {
        $this->salary = $val;
        return $this;
    }

    public function getStarted()
    {
        return $this->started;
    }

    public function setStarted($val)
    {
        $this->started = $val;
        return $this;
    }

    public function getLeft()
    {
        return $this->left;
    }

    public function setLeft($val)
    {
        $this->left = $val;
        return $this;
    }

    public function getAddress()
    {
        return $this->address;
    }

    public function setAddress($val)
    {
        $this->address = $val;
        return $this;
    }
}
Return current item: MongoDB Object Document Mapper