I am using Doctrine I have to make a lot of models, and it would be nice if I wouldnt have to do everything manually.
I set and attribute like this:
/**
* @var string $name
*
* @Column(name="Name", type="string", length=100, nullable=false)
*/
private $name;
The get & set method are made from information, which is entirely included in the attribute declaration. So does anyone know any tools that would generate the get set methods like below from the attribute declaration.
/**
* Set name
*
* @param string $name
* @return User
*/
public function setName($name)
{
$this->name = $name;
return $this;
}
/**
* Get name
*
* @return string
*/
public function getName()
{
return $this->name;
}
In the doctrine documentation I found this tool(Entity Generation), but I have trouble understanding what I should do.
php app/console doctrine:generate:entities