1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/tests/Doctrine/Tests/Models/CMS/CmsPhonenumber.php

27 lines
523 B
PHP
Raw Normal View History

<?php
namespace Doctrine\Tests\Models\CMS;
/**
* @DoctrineEntity
* @DoctrineTable(name="cms_phonenumbers")
*/
class CmsPhonenumber
{
/**
* @DoctrineColumn(type="varchar", length=50)
* @DoctrineId
*/
public $phonenumber;
/**
* @DoctrineManyToOne(targetEntity="CmsUser")
* @DoctrineJoinColumn(name="user_id", referencedColumnName="id")
*/
public $user;
public function setUser(CmsUser $user) {
$this->user = $user;
$user->addPhonenumber($this);
}
}