Created
          September 7, 2012 20:38 
        
      - 
      
- 
        Save baldurrensch/3669417 to your computer and use it in GitHub Desktop. 
    Simple field example
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | <?php | |
| // Of course you also need your Doctrine Annotations | |
| class Example | |
| { | |
| protected $firstName; | |
| protected $lastName; | |
| protected $username; | |
| public function setFirstName($firstName) | |
| { | |
| $this->username = $firstName . "." . $this->lastName; | |
| $this->firstName = $firstName; | |
| } | |
| public function setLastName($lastName) | |
| { | |
| $this->username = $this->firstName . "." . $lastName; | |
| $this->lastName = $lastName; | |
| } | |
| // getters as always | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment