Zf2实体加入

Can you help me? I can't understand how to join 2 and more tables, each table has the entity. Whether it is possible to use as in doctrine? I don't want to use doctrine.

How to join entities and use in views?

class User
{
    protected $id;
    protected $email;
    protected $password;

    public function getId()
    {
        return $this->id;
    }
    public function setId($value)
    {
        $this->id = $value;
    }
    public function setEmail($value)
    {
        $this->email = $value;
    }
    public function getEmail()
    {
        return $this->email;
    }
    public function setPassword($value)
    {
        $this->password = $value;
    }
    public function getPassword()
    {
        return $this->password;
    }
}

class Info
{
    protected $id;
    protected $lastname;
    protected $firstname;

    public function getId()
    {
        return $this->id;
    }
    public function setId($value)
    {
        $this->id = $value;
    }
    public function setLastname($value)
    {
        $this->lastname = $value;
    }
    public function getLastname()
    {
        return $this->lastname;
    }
    public function setFirstname($value)
    {
        $this->firstname = $value;
    }
    public function getFirstname()
    {
        return $this->firstname;
    }
}
class User
{
    ...
    protected $info;

    ...
    public function readInfo()
    {
        return $this->info;
    }

    public function writeInfo(Info $entity)
    {
        $this->info = $entity;
        return $this;
    }
}

class ModelUser
{
    public function get()
    {
        $query = 'query for user with info';
        $adapter = Zend\Db\TableGateway\Feature\GlobalAdapterFeature::getStaticAdapter();
        $result = $adapter->query($query, \Zend\Db\Adapter\Adapter::QUERY_MODE_EXECUTE);

        /* Or use tableGateway */ 

        /* Class methods hydrator */
        $hydrator = new \Zend\Stdlib\Hydrator\ClassMethods;
        /* Hydrate User entity from result */
        $userEntity = $hydrator->hydrate($result->toArray(), new User);
        /* Hydrate Info entity from result */
        $infoEntity = $hydrator->hydrate($result->toArray(), new Info);
        /* Write Info entity to User entity */
        $userEntity->writeInfo($infoEntity);

        return $userEntity;
    }
}

class UserController
{
    public function indexAction()
    {
        $model = new ModelUser();
        $userEntity = $model->get();

        return array(
            'user' => $userEntity
        );
    }
 }