public function unregisterObjects($types)
    {
        if (!is_array($types)) {
            $types = [ $types ];
        }

        // Filter all objects
        foreach ($this->serviceCache as $key => $object) {
            foreach ($types as $filterClass) {
                // Prevent destructive flushing
                if (strcasecmp($filterClass, 'object') === 0) {
                    throw new InvalidArgumentException("Global unregistration is not allowed");
                }
                if ($object instanceof $filterClass) {
                    $this->unregisterNamedObject($key);
                    break;
                }
            }
        }
        return $this;
    }