/** * @param LoopModelInterface $loop * @param bool $all * @return LoopModelInterface */ public function swap(LoopModelInterface $loop, $all = false) { $this->stop(); $loop->stop(); $list = $all === true ? $this : $this->getTransferableProperties(); foreach ($this as $key => $val) { $tmp = $loop->{$key}; $loop->{$key} = $this->{$key}; $this->{$key} = $tmp; } return $this; }
/** * */ public function stop() { $this->loop->stop(); }