/** * Creates embedded message path composed of ancestor messages * seperated by slash "/". If message has no ancestor returns empty string. * * @param DescriptorInterface $descriptor message descriptor * * @return string */ private function _createEmbeddedMessagePath(DescriptorInterface $descriptor) { $containing = $descriptor->getContaining(); $path = array(); while ($containing) { $path[] = $containing->getName(); $containing = $containing->getContaining(); } array_reverse($path); return implode("/", $path); }