php - Assign a default value to a variable symfony2 annotation -



php - Assign a default value to a variable symfony2 annotation -

this question has reply here:

doctrine 2.1 - datetime column default value 4 answers

how can assign (cuurent_time) default value variable ($dateajout)

/** * @var \datetime * * @orm\column(name="dateajout", type="datetime" , nullable=true) */ private $dateajout;

have tried this:

class dummy { /** * @var \datetime * * @orm\column(name="dateajout", type="datetime" , nullable=true) */ private $dateajout; public function __construct() { $this->dateajout = new \datetime(); } }

?

php doctrine2

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -