original_string: public function associate($rowId, $model)
      {
          if(is_string($model) && ! class_exists($model)) {
              throw new UnknownModelException("The supplied model {$model} does not exist.");
          }
  
          $cartItem = $this->get($rowId);
  
          $cartItem->associate($model);
  
          $content = $this->getContent();
  
          $content->put($cartItem->rowId, $cartItem);
  
          $this->session->put($this->instance, $content);
      }
code: public function associate($rowId, $model)
      {
          if(is_string($model) && ! class_exists($model)) {
              throw new UnknownModelException("The supplied model {$model} does not exist.");
          }
  
          $cartItem = $this->get($rowId);
  
          $cartItem->associate($model);
  
          $content = $this->getContent();
  
          $content->put($cartItem->rowId, $cartItem);
  
          $this->session->put($this->instance, $content);
      }
code_tokens: public function associate ( $ rowId , $ model ) { if ( is_string ( $ model ) && ! class_exists ( $ model ) ) { throw new UnknownModelException ( "The supplied model {$model} does not exist." ) ; } $ cartItem = $ this -> get ( $ rowId ) ; $ cartItem -> associate ( $ model ) ; $ content = $ this -> getContent ( ) ; $ content -> put ( $ cartItem -> rowId , $ cartItem ) ; $ this -> session -> put ( $ this -> instance , $ content ) ; }
docstring: Associate the cart item with the given rowId with the given model.
  
  @param string $rowId
  @param mixed  $model
  @return void
docstring_tokens: Associate the cart item with the given rowId with the given model .