user = $user; } /** * Get id. * * @return int */ public function getId() { return $this->id; } /** * Set host. * * @param string $host * * @return SiteCredential */ public function setHost($host) { $this->host = $host; return $this; } /** * Get host. * * @return string */ public function getHost() { return $this->host; } /** * Set username. * * @param string $username * * @return SiteCredential */ public function setUsername($username) { $this->username = $username; return $this; } /** * Get username. * * @return string */ public function getUsername() { return $this->username; } /** * Set password. * * @param string $password * * @return SiteCredential */ public function setPassword($password) { $this->password = $password; return $this; } /** * Get password. * * @return string */ public function getPassword() { return $this->password; } /** * Set createdAt. * * @param \DateTime $createdAt * * @return SiteCredential */ public function setCreatedAt($createdAt) { $this->createdAt = $createdAt; return $this; } /** * Get createdAt. * * @return \DateTime */ public function getCreatedAt() { return $this->createdAt; } /** * @return User */ public function getUser() { return $this->user; } /** * @ORM\PrePersist */ public function timestamps() { if (null === $this->createdAt) { $this->createdAt = new \DateTime(); } } }