/** * @param null|int $index * * @return \Awl\Compiler\Node||\Awl\Compiler\Node[] */ public function retrieve($index = null) { if (!is_null($index)) { return $this->root->getChildAt($index); } return $this->root; }
public function prepare(Node $node) { if ($node->getName() !== 'workflow') { throw new \InvalidArgumentException('Handler cannot find a workflow in root node.'); } $this->targets[$this->buildFqn(['Messages', 'RequestInterface'])] = null; $this->targets[$this->buildFqn(['Messages', 'ResponseInterface'])] = null; }
public function prepare(Node $node) { if ($node->getName() !== 'workflow') { throw new \InvalidArgumentException('Handler cannot find a workflow in root node.'); } $fqn = $this->buildFqn(['Workflows', 'WorkflowInterface']); $this->targets[$fqn] = null; }