protected function getContainer()
    {
        if ($this->container) {
            return $this->container;
        }

        try {
            return $this->container = $this->objectStore->getContainer($this->containerName);
        } catch (BadResponseException $e) { //OpenCloud lib does not wrap this exception
            if (!$this->createContainer) {
                throw new \RuntimeException(sprintf('Container "%s" does not exist.', $this->containerName));
            }
        }

        if (!$container = $this->objectStore->createContainer($this->containerName)) {
            throw new \RuntimeException(sprintf('Container "%s" could not be created.', $this->containerName));
        }

        return $this->container = $container;
    }
protected function getContainer()
    {
        if ($this->container) {
            return $this->container;
        }

        try {
            return $this->container = $this->objectStore->getContainer($this->containerName);
        } catch (BadResponseException $e) { //OpenCloud lib does not wrap this exception
            if (!$this->createContainer) {
                throw new \RuntimeException(sprintf('Container "%s" does not exist.', $this->containerName));
            }
        }

        if (!$container = $this->objectStore->createContainer($this->containerName)) {
            throw new \RuntimeException(sprintf('Container "%s" could not be created.', $this->containerName));
        }

        return $this->container = $container;
    }
protected function getContainer ( ) { if ( $ this -> container ) { return $ this -> container ; } try { return $ this -> container = $ this -> objectStore -> getContainer ( $ this -> containerName ) ; } catch ( BadResponseException $ e ) { //OpenCloud lib does not wrap this exception if ( ! $ this -> createContainer ) { throw new \ RuntimeException ( sprintf ( 'Container "%s" does not exist.' , $ this -> containerName ) ) ; } } if ( ! $ container = $ this -> objectStore -> createContainer ( $ this -> containerName ) ) { throw new \ RuntimeException ( sprintf ( 'Container "%s" could not be created.' , $ this -> containerName ) ) ; } return $ this -> container = $ container ; }
Returns an initialized container.

@throws \RuntimeException

@return Container
Returns an initialized container .