public function addLoop($code, $priority = 5, $inline = false) {
        $loop = new Loop();
        $loop->setCode($code)
             ->setPriority($priority)
             ->setInline($inline);
        $this->builder->addEvent($loop);
        return $this;
    }