/**
  * {@inheritDoc}
  */
 public function getArchivedBy()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getArchivedBy', array());
     return parent::getArchivedBy();
 }
Example #2
0
 /**
  * Set archive state and return true or false.
  *
  * Executes DQL to update archive to new state but only if expected state is there.
  *
  * @param \Entities\Archive $archive Archive to change state
  * @param string $newState Ne state for archive
  * @param string $stateExcpected State which expected to be in archive when changing
  * @return bool
  */
 private function _archiveStateChange($archive, $newState, $stateExcpected)
 {
     $query = $this->getD2EM()->createQuery(sprintf("UPDATE \\Entities\\Archive a SET a.status = '%s', a.status_changed_at = '%s' WHERE a.status = '%s' AND a.id = %d", $newState, date("Y-m-d H:i:s"), $stateExcpected, $archive->getId()));
     return $query->getResult() != 1 ? false : true;
 }