Example #1
0
 /**
  * Joins FQN to the clone of the current FQN and returns it
  *
  * @return FQN
  */
 public function join(FQN $join)
 {
     $result = new self();
     $resultParts = $this->getParts();
     $joiningParts = $join->getParts();
     if ($this->getLast() === $join->getFirst()) {
         array_shift($joiningParts);
     }
     $result->setParts(array_merge($resultParts, $joiningParts));
     return $result;
 }
Example #2
0
 public function toString()
 {
     $str = parent::toString();
     if ($this->isArray()) {
         $str .= '[]';
     }
     return $str;
 }