original_string: public function install(
          WorkerInterface $worker,
          $looptime = 1,
          $forever = false
      ) {
  
          $name = $worker->getName();
  
          if ( $this->isInstalled($name) ) {
              throw new Exception("Worker already installed");
          }
  
          $w = Worker::create()
              ->setInstance($worker)
              ->setLooptime($looptime)
              ->setForever($forever)
              ->setInputChannel(new SharedMemory((int) '1'.hexdec($worker->getId())))
              ->setOutputChannel(new SharedMemory((int) '2'.hexdec($worker->getId())));
  
          $this->data[$name] = $w;
  
          return $this;
  
      }
code: public function install(
          WorkerInterface $worker,
          $looptime = 1,
          $forever = false
      ) {
  
          $name = $worker->getName();
  
          if ( $this->isInstalled($name) ) {
              throw new Exception("Worker already installed");
          }
  
          $w = Worker::create()
              ->setInstance($worker)
              ->setLooptime($looptime)
              ->setForever($forever)
              ->setInputChannel(new SharedMemory((int) '1'.hexdec($worker->getId())))
              ->setOutputChannel(new SharedMemory((int) '2'.hexdec($worker->getId())));
  
          $this->data[$name] = $w;
  
          return $this;
  
      }
code_tokens: public function install ( WorkerInterface $ worker , $ looptime = 1 , $ forever = false ) { $ name = $ worker -> getName ( ) ; if ( $ this -> isInstalled ( $ name ) ) { throw new Exception ( "Worker already installed" ) ; } $ w = Worker :: create ( ) -> setInstance ( $ worker ) -> setLooptime ( $ looptime ) -> setForever ( $ forever ) -> setInputChannel ( new SharedMemory ( ( int ) '1' . hexdec ( $ worker -> getId ( ) ) ) ) -> setOutputChannel ( new SharedMemory ( ( int ) '2' . hexdec ( $ worker -> getId ( ) ) ) ) ; $ this -> data [ $ name ] = $ w ; return $ this ; }
docstring: Install a worker into the stack
  
  @param WorkerInterface $worker
  @param int $looptime
  @param bool $forever
  @return Manager
docstring_tokens: Install a worker into the stack