Exemplo n.º 1
0
 /**
  * @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;
 }
Exemplo n.º 2
0
 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;
 }
Exemplo n.º 3
0
 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;
 }