Example #1
0
 /**
  * Represent URI component as a string
  *
  * @return string
  *
  * @since 0.3
  */
 public function __toString()
 {
     if (is_array($this->keyValue)) {
         $string = [];
         /** @noinspection ForeachSourceInspection */
         foreach ($this->keyValue as $key => $value) {
             $string[] = $key . '=' . $value;
         }
         $string = implode(',', $string);
     } else {
         $string = $this->keyValue;
     }
     return '(' . $string . ')' . parent::__toString();
 }
Example #2
0
 /**
  * Represent URI component as a string
  *
  * @return string
  *
  * @since 0.3
  */
 public function __toString()
 {
     return '/' . $this->name . parent::__toString();
 }
Example #3
0
 /**
  * Represent URI component as a string
  *
  * @return string
  *
  * @since 0.3
  */
 public function __toString()
 {
     return parent::__toString() . $this->options;
 }