original_string: public function instance(string $abstract, $instance) : ContainerInterface
      {
          if (! is_object($instance)) {
              throw new ContainerException('Trying to store ' . gettype($instance) . ' as object.');
          }
  
          $this->collection[$abstract] = $instance;
  
          return $this;
      }
code: public function instance(string $abstract, $instance) : ContainerInterface
      {
          if (! is_object($instance)) {
              throw new ContainerException('Trying to store ' . gettype($instance) . ' as object.');
          }
  
          $this->collection[$abstract] = $instance;
  
          return $this;
      }
code_tokens: public function instance ( string $ abstract , $ instance ) : ContainerInterface { if ( ! is_object ( $ instance ) ) { throw new ContainerException ( 'Trying to store ' . gettype ( $ instance ) . ' as object.' ) ; } $ this -> collection [ $ abstract ] = $ instance ; return $ this ; }
docstring: Bind an object to the container.
  
  @param string $abstract The alias name that will be used to call the object.
  @param object $instance The object that will be inserted.
  
  @throws ContainerException When $instance is not an object.
  @return ContainerInterface
docstring_tokens: Bind an object to the container .