1
0
mirror of synced 2024-12-14 07:06:04 +03:00
doctrine2/tests/models/forum/ForumUser.php
2008-02-23 22:04:39 +00:00

32 lines
928 B
PHP

<?php
class ForumUser extends Doctrine_Record
{
public static function initMetadata($class)
{
// inheritance mapping
$class->setInheritanceType(Doctrine::INHERITANCETYPE_JOINED, array(
'discriminatorColumn' => 'dtype',
'discriminatorMap' => array(
'user' => 'ForumUser',
'admin' => 'ForumAdministrator')
));
$class->setSubclasses(array('ForumAdministrator'));
// the discriminator column
$class->mapColumn('dtype', 'string', 50);
// column mapping
$class->mapColumn('id', 'integer', 4, array(
'primary' => true,
'autoincrement' => true));
$class->mapColumn('username', 'string', 50);
}
/*
public function getUsername()
{
return $this->rawGet('username') . "!";
}
*/
}