@param string $container
@param string $name

@return bool
558974
public function blobExists($container, $name)
    {
        try {
            $this->checkConnection();
            $cursor = $this->gridFindOne($name);
            if (!is_null($cursor)) {
                return true;
            }
        } catch (\Exception $ex) {
            return false;
        }

        return false;
    }
263166
protected function hasDockerContainer($name)
    {
        /** @var ResultData $result */
        $result = $this->runSilentCommand(
            $this->taskExec("docker ps --filter='name={$name}' -q")
        );
        $output = $result->getMessage();

        return isset($output) && !empty($output);
    }
67046
private function checkEntityContainer( Container $container, &$error = null )
    {
        $error = '';
        // get class'
        if( ( $existing = $this->classGet() ) and ( $new = $container->classGet() ) ) {
            if( $existing === $new ) {
                return true;
            // PHP's instanceof doesn't work with the first argument as a string
            } elseif( is_subclass_of( $new, $existing ) ) {
                return true;
            }
            $error = "Can't add container of class `{$new}` to `{$existing}`";
            return false;
        }
        return true;
    }
810225
public function pathResolvable(Container $container)
    {
        $this->setDependencies($container);

        $object = $this->getObjectRouteFromPath();
        if (!$object->id()) {
            return false;
        }

        $contextObject = $this->getContextObject();

        if (!$contextObject || !$contextObject->id()) {
            return false;
        }

        return (!!$contextObject->active() && !!$contextObject->isActiveRoute());
    }
451520
private function getContainerInfo(string $nameInLayout, array $container)
    {
        $result = self::filterEscapeEncode([
            'info' => [
                'nameInLayout' => $nameInLayout,
                'label' => $container['label'] ?? null
            ],
            'extra' => [
                'parent' => $container['parent'] ?? null,
                'children' => isset($container['children']) ? array_values($container['children']) : null,
            ]
        ]);

        return $result;
    }
1180174
protected function setControllerLoader(Container $container): callable
    {
        return $container->protect(function (string $name) use ($container) {
            $parts = \explode('_', $name);
            $class = $container['config']('suit.namespaces.controller', '\\App\\Controller\\');
            foreach ($parts as $part) {
                $class .= \ucfirst($part);
            }
            if (!$container->has('controller_'.$class)) {
                $container['controller_'.$class] = function ($container) use ($class) {
                    return new $class($container);
                };
            }

            return $container['controller_'.$class];
        });
    }
85038
public function deleteBlob($container, $name, $noCheck = false)
    {
        try {
            $this->checkConnection();
            $this->blobConn->deleteBlob($container, $this->fixBlobName($name));
        } catch (\Exception $ex) {
            if ($ex instanceof ServiceException) {
                if ($ex->getCode() === HttpStatusCodes::HTTP_NOT_FOUND) {
                    if ($noCheck) {
                        return;
                    }
                    throw new NotFoundException("File '$name' was not found.'");
                }
            }
            throw new DfException('Failed to delete blob "' . $name . '": ' . $ex->getMessage());
        }
    }
595178
protected function _parseItem(Container $container, $name)
    {
        try {
            $element = $container[$name];
        } catch (\Exception $e) {
            return null;
        }

        if (is_object($element)) {
            if ($element instanceof \Closure) {
                $type  = 'closure';
                $value = '';

            } elseif ($element instanceof Container) {
                $value = $this->_parseContainer($element);
                $type  = is_array($value) ? 'container' : 'class';

            } else {
                $type  = 'class';
                $value = get_class($element);
            }

        } elseif (is_array($element)) {
            $type  = 'array';
            $value = '';

        } elseif (is_string($element)) {
            $type  = 'string';
            $value = $element;

        } elseif (is_int($element)) {
            $type  = 'int';
            $value = $element;

        } elseif (is_float($element)) {
            $type  = 'float';
            $value = $element;

        } elseif (is_bool($element)) {
            $type  = 'bool';
            $value = $element;

        } elseif ($element === null) {
            $type  = 'null';
            $value = '';

        } else {
            $type  = 'unknown';
            $value = gettype($element);
        }

        return array(
            'name'  => $name,
            'type'  => $type,
            'value' => $value,
        );
    }
562820
public function get($name)
    {
        $tid = $this->getTid($name);
        if (!isset($this->_containers[$tid])) {
            $this->_containers[$tid] = new Container([
                'manager' => $this,
            ]);
        }
        return $this->_containers[$tid]->get($name);
    }
1161915
public function getContainer($name)
    {
        if (!array_key_exists($name, $this->containers)) {
            throw new ContainerNotFoundException("No container with name '{$name}' found");
        }

        return $this->containers[$name];
    }
256663
public function has($name, $checkAbstractFactories = true, $usePeeringServiceManagers = false)
    {
        if (is_string($name) && $this->container->has($name)) {
            return true;
        } elseif (parent::has($name, $checkAbstractFactories, $usePeeringServiceManagers)) {
            return true;
        }

        return false;
    }
1268780
public function getBlobData($container = '', $name = '')
    {
        $this->checkConnection();
        try {
            /** @var Container $container */
            $container = $this->blobConn->getContainer($container);
            if (empty($container)) {
                throw new \Exception("No container named '$container'");
            }

            $obj = $container->getObject($name);
            $request = $obj->getClient()->get($obj->getUrl());
            /** @var \Guzzle\Http\Message\Response $result */
            $result = $request->send();

            return $result->getBody(true);
        } catch (\Exception $ex) {
            static::handleGuzzleException($ex);
            throw new DfException("Failed to retrieve blob '$name': " . $ex->getMessage());
        }
    }
554443
public static function get($id, $name = '')
    {
        $container = self::getContainer($name);

        return $container->get($id);
    }
1241222
public function method($name)
    {
        $method = new Method($name);
        $this->container->put($name, $method);

        return $method;
    }
255167
public function hasService($name)
    {
        if (!$this->serviceManager) {
            return false;
        }

        return $this->serviceManager->has($name, false);
    }
174660
public function hasCommand($name) {
        if (!$this->docoptResult)
            return false;

        if ($this->isCommand($name)) {
            $value = $this->docoptResult[$name];
            if (is_int($value) && $value > 1)
                return $value;
            return (bool) $value;
        }
        return false;
    }
941288
protected function getContainer($name)
    {
        if (!isset($this->containers[$name])) {
            $this->createContainer($name);
        }

        return $this->containers[$name];
    }