2007-09-02 18:24:49 +04:00
|
|
|
<?php
|
|
|
|
class ValidatorTest_Person extends Doctrine_Record {
|
2008-02-04 00:29:57 +03:00
|
|
|
public static function initMetadata($class) {
|
2008-02-24 01:04:39 +03:00
|
|
|
$class->setColumn('identifier', 'integer', 4,
|
|
|
|
array('validators' => array('notblank', 'unique')));
|
2008-02-04 00:29:57 +03:00
|
|
|
$class->setColumn('is_football_player', 'boolean');
|
2008-02-24 01:04:39 +03:00
|
|
|
$class->hasOne('ValidatorTest_FootballPlayer',
|
|
|
|
array('local' => 'id', 'foreign' => 'person_id'));
|
2007-09-02 18:24:49 +04:00
|
|
|
}
|
|
|
|
}
|