Are the contents of a container identical to another container.
This a === b if a contains b and count(a) = count(b);
@param Container $container
@param bool Is ordering significant. Is the order of elements in a container significant.
@return bool
488562
public function isSameAs( Container $container, $orderingIsSignificant = false )
    {
        $comparingClass = $container->classGet();
        $thisClass = $this->classGet();

        if( $comparingClass and $thisClass and $thisClass !== $comparingClass ) {
            return false;
        }

        if( $orderingIsSignificant ) {
            return array_keys( $this->collection ) === array_keys( $container->collection );
        } else {
            return $this->contains( $container ) and count( $container ) === count( $this );
        }
    }
1262093
public function pushContainer(array $container)
    {
        if (!empty($container['required'])) {
            $this->hasRequired = true;
        }
        if (empty($this->containers)) {
            $this->array      += $container;
            $this->containers  = array(&$this->array['elements']);
        } else {
            $cntIndex = count($this->containers) - 1;
            $myIndex  = count($this->containers[$cntIndex]);
            $this->containers[$cntIndex][$myIndex] = $container;
            $this->containers[$cntIndex + 1] =& $this->containers[$cntIndex][$myIndex]['elements'];
        }
    }
309597
public function has($id)
    {
        foreach ($this->containers as $container) {
            if ($container->has($id)) {
                return true;
            }
        }

        return false;
    }
700701
protected function addMerchantRelationshipSalesOrderThresholdFacade(Container $container)
    {
        $container[static::FACADE_MERCHANT_RELATIONSHIP_SALES_ORDER_THRESHOLD] = function (Container $container) {
            return new MerchantRelationshipSalesOrderThresholdDataImportToMerchantRelationshipSalesOrderThresholdFacadeBridge(
                $container->getLocator()->merchantRelationshipSalesOrderThreshold()->facade()
            );
        };

        return $container;
    }
749984
public function get(Container $container)
    {
        if ($this->scope === null) {
            $this->scope = $this->getDefaultScope();
        }

        return $this->scope->get($this, $container);
    }
947199
public function has($id) {
		foreach($this->values as $container) {
			if($container->has($id)) {
				return true;
			}
		}
		return false;
	}
830324
def contains(container, item):
    """"""

    # equality counts as containment and is usually non destructive
    if container == item:
        return True

    # testing mapping containment is usually non destructive
    if isinstance(container, abc.Mapping) and mapping_contains(container, item):
        return True

    # standard containment except special cases
    if isinstance(container, str):
        # str __contains__ includes substring match that we don't count as containment
        if strict_contains(container, item):
            return True
    else:
        try:
            if item in container:
                return True
        except Exception:
            pass

    # search matches in generic instances
    return instance_contains(container, item)
822010
public function exists($key)
    {
        $this->init();
        list($containerName, $key) = $this->tokenizeKey($key);

        $listBlobsOptions = new ListBlobsOptions();
        $listBlobsOptions->setPrefix($key);

        try {
            $blobsList = $this->blobProxy->listBlobs($containerName, $listBlobsOptions);

            foreach ($blobsList->getBlobs() as $blob) {
                if ($key === $blob->getName()) {
                    return true;
                }
            }
        } catch (ServiceException $e) {
            $errorCode = $this->getErrorCodeFromServiceException($e);
            if ($this->multiContainerMode && self::ERROR_CONTAINER_NOT_FOUND === $errorCode) {
                return false;
            }
            $this->failIfContainerNotFound($e, 'check if key exists', $containerName);

            throw new \RuntimeException(sprintf(
                'Failed to check if key "%s" exists in container "%s": %s (%s).',
                $key,
                $containerName,
                $e->getErrorText(),
                $errorCode
            ), $e->getCode());
        }

        return false;
    }
752113
public function has($id)
    {
        if (!is_string($id)) {
            throw new ContainerException('$id must be a string');
        }

        if (array_key_exists($id, $this->definitions)) {
            return true;
        }

        return false;
    }
1108483
public function provideBusinessLayerDependencies(Container $container): Container
    {
        $container = parent::provideBusinessLayerDependencies($container);

        $container = $this->addCompanyFacade($container);
        $container = $this->addCompanyMapperPlugins($container);

        return $container;
    }
698083
public function process(ContainerBuilder $container)
    {
        do {
            $this->repeat = false;
            foreach ($this->passes as $pass) {
                $pass->process($container);
            }
        } while ($this->repeat);
    }
1054365
private function isExifMetadataReaderSet(ContainerBuilder $container): bool
    {
        return $container->getDefinition(self::$metadataReaderServiceId)->getClass() === self::$metadataReaderExifClass;
    }
1236539
public function blobExists($container, $name)
    {
        try {
            $this->checkConnection();
            $name = $this->fixBlobName($name);
            if (empty($name)) {
                return false;
            }
            $this->blobConn->getBlobProperties($container, $name);

            return true;
        } catch (\Exception $ex) {
            if (false === stripos($ex->getMessage(), 'does not exist')) {
                throw $ex;
            }
        }

        return false;
    }
39482
public static function isEqual($a, $b)
    {
        if ($a === $b) {
            return true;
        } elseif ($a instanceof \stdClass) {
            return self::isEqual((array) $a, $b);
        } elseif ($b instanceof \stdClass) {
            return self::isEqual($a, (array) $b);
        } else {
            return false;
        }
    }
1339444
public function providePersistenceLayerDependencies(Container $container): Container
    {
        $container = parent::providePersistenceLayerDependencies($container);
        $container = $this->addBrandPropelQuery($container);
        $container = $this->addBrandProductPropelQuery($container);

        return $container;
    }
1079229
public boolean contains(Container subset) {
    if(subset instanceof RunContainer) {
      return contains((RunContainer)subset);
    } else if(subset instanceof ArrayContainer) {
      return contains((ArrayContainer) subset);
    } else if(subset instanceof BitmapContainer){
      return contains((BitmapContainer)subset);
    }
    return false;
  }
679563
public static function initContainer($container)
    {
        if ($container instanceof \Pimple\Container) {
            static::$container = $container;
            static::$logger = static::$container
                ->offsetGet(\oat\oatbox\log\LoggerService::SERVICE_ID)
                ->getLogger();
        }
    }