I use Doctrine. I need to make many models, and it would be nice if I didn't have to do everything manually,
I set the attributes as follows:
/** * @var string $name * * @Column(name="Name", type="string", length=100, nullable=false) */ private $name;
The get and set method is created from information that is fully included in the attribute declaration. So does anyone know of any tools that will generate get set methods, as shown below, from an attribute declaration.
public function setName($name) { $this->name = $name; return $this; } public function getName() { return $this->name; }
I found this tool (Entity Generation) in the documentation of the doctrine, but itβs hard for me to understand what I should do.
source share