original_string: public function unload($objectName)
      {
          if (empty($this->_loaded[$objectName])) {
              list($plugin, $objectName) = pluginSplit($objectName);
              $this->_throwMissingClassError($objectName, $plugin);
          }
  
          $object = $this->_loaded[$objectName];
          if ($this instanceof EventDispatcherInterface && $object instanceof EventListenerInterface) {
              $this->getEventManager()->off($object);
          }
          unset($this->_loaded[$objectName]);
  
          return $this;
      }
code: public function unload($objectName)
      {
          if (empty($this->_loaded[$objectName])) {
              list($plugin, $objectName) = pluginSplit($objectName);
              $this->_throwMissingClassError($objectName, $plugin);
          }
  
          $object = $this->_loaded[$objectName];
          if ($this instanceof EventDispatcherInterface && $object instanceof EventListenerInterface) {
              $this->getEventManager()->off($object);
          }
          unset($this->_loaded[$objectName]);
  
          return $this;
      }
code_tokens: public function unload ( $ objectName ) { if ( empty ( $ this -> _loaded [ $ objectName ] ) ) { list ( $ plugin , $ objectName ) = pluginSplit ( $ objectName ) ; $ this -> _throwMissingClassError ( $ objectName , $ plugin ) ; } $ object = $ this -> _loaded [ $ objectName ] ; if ( $ this instanceof EventDispatcherInterface && $ object instanceof EventListenerInterface ) { $ this -> getEventManager ( ) -> off ( $ object ) ; } unset ( $ this -> _loaded [ $ objectName ] ) ; return $ this ; }
docstring: Remove an object from the registry.
  
  If this registry has an event manager, the object will be detached from any events as well.
  
  @param string $objectName The name of the object to remove from the registry.
  @return $this
docstring_tokens: Remove an object from the registry .