/** * Called before persist to storage * * @return void */ protected function onBeforePersist() { parent::onBeforePersist(); if ($extra = $this->getRawProperty('extra')) { $this->setRawValue('extra', $extra->export()); } else { $this->setRawValue('extra', NULL); } $this->crawledAt = new DateTime(); }
/** * Called before persist to storage * * @return void */ protected function onBeforePersist() { parent::onBeforePersist(); $this->crawledAt = new DateTime(); }