Hi,

I try to make a get function in a doctrine model class of an existed
field table...

That's my schema.yml :
Media:
  columns:
    id: {type: integer(4), primary: true, autoincrement: true,
sequence: media_id}
    name: {type: string(50)}
    title: {type: string(50)}
    alt: {type: string(50)}
    source: {type: string(255)}
    width: {type: integer(4)}    # this is my field than I try to get
    height: {type: integer(4)}

That's my model class :
class Media extends BaseMedia
{
  public function getWidth() {
    $width = $this->get('width'); //make a loop error
    #$width = $this->width; //$this->width doesn't exist
    return $width != '0' ? $width : '';
  }
}


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to