private function compositeToStdObject(ProcessableInterface $tree) { if ($tree->isAListOfTrees()) { return $this->listOfTreesToStdObject($tree); } else { return $this->namedTreeToStdObject($tree); } }
/** * @param ProcessableInterface $message * @return array|string */ private function buildCompositeMessageBody(ProcessableInterface $message) { if ($message->isAListOfTrees()) { $content = $this->buildListOfTreeBody($message); } else { $content = $this->buildChildrenTreeBody($message); } return $content; }