示例#1
0
 /**
  * @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;
 }
示例#2
0
文件: UserInfo.php 项目: barryvdh/uri
 /**
  * @inheritdoc
  */
 public function __toString()
 {
     $userInfo = $this->user->__toString();
     if ('' === $userInfo) {
         return $userInfo;
     }
     $pass = $this->pass->__toString();
     if ('' !== $pass) {
         $userInfo .= UserInfoInterface::SEPARATOR . $pass;
     }
     return $userInfo;
 }
示例#3
0
 /**
  * {@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();
 }