/** * 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; }
public function toString() { $str = parent::toString(); if ($this->isArray()) { $str .= '[]'; } return $str; }