Location: PHPKode > projects > MongoDB Object Document Mapper > tools/sandbox/Documents/Account.php
<?php

namespace Documents;

/** @Document(collection="accounts") */
class Account
{
    /** @Id */
    private $id;

    /** @String */
    private $name;

    public function __construct($name)
    {
        $this->name = $name;
    }

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

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

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

    public function __toString()
    {
        return $this->name;
    }
}
Return current item: MongoDB Object Document Mapper