Changeset 4436 for trunk/tests/models

Show
Ignore:
Timestamp:
05/25/08 21:57:32 (8 months ago)
Author:
romanb
Message:

custom/magic accessors + test

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/models/forum/ForumUser.php

    r4417 r4436  
    2121                'primary' => true, 
    2222                'autoincrement' => true)); 
    23         $class->mapColumn('username', 'string', 50, array('accessor' => 'getUsernameCustom')); 
     23        $class->mapColumn('username', 'string', 50, array( 
     24                'accessor' => 'getUsernameCustom', 
     25                'mutator' => 'setUsernameCustom')); 
    2426         
    2527    } 
     
    3032    } 
    3133     
     34    public function setUsernameCustom($username) 
     35    { 
     36        $this->rawSetField('username', $username . "?"); 
     37    } 
     38     
    3239}