Close all open state documents.

@return string[] List of keys of states that were closed.
542602
public function closeAll()
    {
        $open = array();
        foreach ($this->states as $key => $state) {
            if ($state->isOpen()) {
                $state->close();
                $open[] = $key;
            }
        }
        return $open;
    }
413592
def close_all_files(self):
        """"""
        while len(self.open_file_infos) > 0:
            file_info = self.open_file_infos.pop(0)
            file_info.file_handle.close()
            file_info.file_handle = None
            self.closed_file_infos.append(file_info)
        self.can_open_more_files = True
949085
public function closeConnection() {
		if (is_resource($this->_dbh)) {
			$res = @oci_close($this->_dbh);
			$this->checkError($res);
		}
		else {
			$res = true;
		}

		return $res;
	}
520194
public static function getContainerStates()
    {
        return array(
            ContainerStateKeys::HALT,
            ContainerStateKeys::WAITING_FOR_INITIALIZATION,
            ContainerStateKeys::INITIALIZATION_SUCCESSFUL,
            ContainerStateKeys::DEPLOYMENT_SUCCESSFUL,
            ContainerStateKeys::SERVERS_STARTED_SUCCESSFUL,
            ContainerStateKeys::SHUTDOWN
        );
    }
859233
public function close()
    {
        $this->mongo     = null;
        $this->cursor    = null;
        $this->linkRead  = null;
        $this->linkWrite = null;
        $this->links     = [];
    }
1051854
static public function destroyAll()
    {
        $models = call_user_func_array(get_called_class() . '::where', func_get_args())->take();
        foreach ($models as $m) {
            $m->destroy();
        }
        return $models;
    }
1093790
@Override
    public void close() {
        if (!this.closed.get()) {
            ArrayList<RocksDBCache> toClose;
            synchronized (this.caches) {
                toClose = new ArrayList<>(this.caches.values());
            }

            toClose.forEach(RocksDBCache::close);
            this.closed.set(true);
            log.info("{}: Closed.", LOG_ID);
        }
    }
256351
public function close()
    {
        $this->handlerLock = true;

        while (count($this->handlers) > 0) {
            array_pop($this->handlers);
            $this->stacks['delete']->pop();
            $this->stacks['clean']->pop();
            $this->stacks['create']->pop();
            $this->stacks['read']->pop();
            $this->stacks['write']->pop();
        }

        $this->handlerLock = false;
        return true;
    }
1272545
public function close()
    {
        if (false === $this->openned) {
            return false;
        }
        $this->pclzip = $this->filename = null;
        $this->openned = false;
        if (file_exists(self::TMP_DIR)) {
            $this->_rrmdir(self::TMP_DIR);
            rmdir(self::TMP_DIR);
        }
        return true;
    }
1354297
@Override
  public void close()
  {
    super.close();
    facts.clear();
    indexAndOffsets.clear();

    if (selectors != null) {
      selectors.clear();
    }

    Closer c = Closer.create();
    aggBuffers.forEach(c::register);
    try {
      c.close();
    }
    catch (IOException e) {
      throw new RuntimeException(e);
    }
    aggBuffers.clear();
  }
312694
public function getStates(): array
    {
        return [
            self::STATE_DRAFT           => 'Draft',
            self::STATE_OPEN            => 'Open',
            self::STATE_PAID_PARTIAL    => 'Partially Paid',
            self::STATE_PAID_PROCESSING => 'Paid (payments processing)',
            self::STATE_PAID            => 'Paid',
            self::STATE_WRITTEN_OFF     => 'Written Off',
            self::STATE_CANCELLED       => 'Cancelled',
        ];
    }
788140
@Override
    public void close() {
        if (!this.closed.getAndSet(true)) {
            closeAllIndices(false); // Do not individually clear the cache; we are wiping it anyway when closing it.
            this.cache.close();
            log.info("{}: Closed.", this.traceObjectId);
        }
    }
977609
public function clear()/*# : bool */
    {
        $ends = [ $this->front, $this->back ];
        foreach ($ends as $end) {
            if (!$end->clear()) {
                return $this->falseAndSetError(
                    $end->getError(),
                    $end->getErrorCode()
                );
            }
        }
        return $this->trueAndFlushError();
    }
351767
public function close() {
		$result = fclose($this->file);
		if($result == true) {
			$this->open = false;
			return true;
		}
		return false;
	}
855714
public function closeOpenTokens() {
        $lastToken = $this->last();
        while (count($this->openedTokens) > 0) {
            $lastOpenToken = array_pop($this->openedTokens);
            $this->tokens[] = new Token($lastOpenToken . AbstractBlockRule::CLOSE, $lastToken->getPosition());
        }
    }
1281584
public function close()
    {
        if ('resource' === gettype($this->ch))
            curl_close($this->ch);

        $this->state = self::STATE_CLOSED;

        return $this;
    }
70102
public function getStateAllowableValues()
    {
        return [
            self::STATE_OPEN,
            self::STATE_CLOSED,
            self::STATE_EXPIRED,
            self::STATE_CANCELLED,
            self::STATE_PENDING,
            self::STATE_CHARACTER_DELETED,
        ];
    }