/** * @inheritdoc */ public function __toString() { $userInfo = $this->user->__toString(); if (empty($userInfo)) { return $userInfo; } $pass = $this->pass->__toString(); if (!empty($pass)) { $userInfo .= UserInfoInterface::SEPARATOR . $pass; } return $userInfo; }
/** * @inheritdoc */ public function __toString() { $userInfo = $this->user->__toString(); if ('' === $userInfo) { return $userInfo; } $pass = $this->pass->__toString(); if ('' !== $pass) { $userInfo .= UserInfoInterface::SEPARATOR . $pass; } return $userInfo; }
/** * {@inheritdoc} */ public function getContent() { if (null === $this->user->getContent()) { return null; } $str = $this->user->__toString(); if (null === $this->pass->getContent()) { return $str; } return $str . ':' . $this->pass->__toString(); }