Set the window to busy state,
the window will dim and status message is displayed

@param bool $bool sets busy status of the window
@return void
337991
public function setBusy($bool = true)
    {
        $this->busyCounter = 0;
        $this->isBusy = (bool)$bool;
        if ($bool) {
            $text = "Please wait...";
            if (is_string($bool)) {
                $text = (string)$bool;
            }
            $lbl = Label::create();
            $lbl->setText($text)->setTextColor("fff")->setTextSize(6)
                ->setSize(90, 12)->setAlign("center", "center")
                ->setPosition($this->busyFrame->getWidth() / 2, -($this->busyFrame->getHeight() / 2));

            $this->busyFrame->addChild($lbl);
            $quad = Quad::create();
            $quad->setStyles("Bgs1", "BgDialogBlur");
            $quad->setBackgroundColor("f00")->setSize($this->busyFrame->getWidth(), $this->busyFrame->getHeight());
            $this->busyFrame->addChild($quad);
        } else {
            $this->busyFrame->removeAllChildren();
        }
    }
86085
public function setAutocomplete($bool)
	{
		if (!in_array($bool, [TRUE, FALSE, NULL], TRUE)) {
			throw new InvalidArgumentException('valid values are only true/false/null');
		}
		$this->autocomplete = $bool;

		return $this;
	}
1356320
public function writeBoolean($boolean)
    {
        try {
            $val = ($boolean === true) ? 1 : 0;
            $this->getStream()->write(chr($val));
        } catch (StreamException $e) {
            $this->handleStreamException($e, BinaryStreamAccessException::FLOAT, false);
        }
    }
1305773
public function setKeepalive($bool)
    {
        $this->keepalive = (bool)$bool;
        $this->setOption(\EventUtil::SOL_SOCKET, \EventUtil::SO_KEEPALIVE, $this->keepalive ? true : false);
    }
43152
public static function setLogEnabled(bool $logEnabled): void {
        if ($logEnabled) {
            self::setLogLevel(self::$level);
        } else {
            self::setLogLevel(Logger::OFF);
        }
    }
1360535
public function isDeleted($bool = null)
    {
        if ($bool === null) {
            return $this->deleted;
        }

        $this->deleted = (bool) $bool;

        return $this;
    }
304295
public function allowCredentials($bool = true)
    {
        $this->response = $this->corsHandler->setResponse($this->response)
            ->allowCredentials($bool)
            ->getResponse();

        return $this;
    }
758205
public static void runByBoolean(boolean bool, Runnable trueBlock,
            Runnable falseBlock) {
        if (bool)
            trueBlock.run();
        else
            falseBlock.run();
    }
356842
public function requireIndexes($bool = true)
    {
        if (!$this->isQueryOrScan()) {
            //TODO: exception
        }

        if ($bool) {
            $this->queryClass = Query::class;
        } else {
            $this->queryClass = Scan::class;
        }

        return $this;
    }
1207874
public function flush(bool $final = false): void
    {
        $messages = $this->messages;
        // https://github.com/yiisoft/yii2/issues/5619
        // new messages could be logged while the existing ones are being handled by targets
        $this->messages = [];

        $this->dispatch($messages, $final);
    }
193515
public function setInitializeOption(bool $enabled)
    {
        $this->initialized = $enabled ? (bool)$this->initialized : null;
    }
360050
public function check(bool $value = true)
    {
        if ($value == false) {
            unset($this->attributes['checked']);
        } else {
            $this->attributes['checked'] = $value;
        }
    }
51207
public function setStatus($status)
    {
        if ($status) {
            $this->startMemValue = memory_get_usage(false);
            $this->memoryWidget->create($this->allPlayersGroup);
        } else {
            $this->memoryWidget->destroy($this->allPlayersGroup);
        }
    }
318947
public function usePHPSession($bool = true)
    {
        if (!isset($_SESSION)) {
            session_start();
        }
        $this->_phpsession = $bool;
        return $this;
    }
973221
public function useColor($bool = true)
    {
        if ($this->output instanceof ColorfulOutputInterface) {
            $this->output->getProcessor()->setNoColors(!$bool);
        }

        return $this;
    }
952985
public static function SetStatus(int $status, bool $exit = false) :void
        {
            if (!HttpStatusCode::IsSupported($status)) {
                throw new \Error("Status code {$status} is not supported");
            }

            self::$status = $status;
            self::AddHeader('Status', $status);

            if ($exit) {
                self::ApplyHeaders();
                exit();
            }
        }
718997
public function showToday($bool = null)
    {
        if (isset($bool)) {

            $this->option_show_today = is_bool($bool) ? $bool : false;
            $this->set_options['show_today'] = 'showToday';

            return $this;
        }
        else {

            return $this->option_show_today;
        }
    }