Zapne nebo vypne udrzbu stranek (zobrazi se stranka udrzby)
@param bool $set
493910
public function maintenance(bool $set = true): void
	{
		$file = $this->tempDir . '/maintenance';
		if ($set) {
			file_put_contents($file, '');
		} else {
			if (file_exists($file)) {
				unlink($file);
			}
		}
	}
1162812
public function editMode( $set = null )
    {
        $validModes = array(
            self::EDITMODE_NONE,
            self::EDITMODE_CONTENT,
            self::EDITMODE_LAYOUT
        );

        if ( null !== $set )
        {
            $set = strtolower( $set );

            if ( empty( $set ) || ! in_array( $set, $validModes ) )
            {
                $set = static::EDITMODE_NONE;
            }
        }

        return $this->setting( 'editMode', $set );
    }
690225
public function intersect(Value $set)
    {
        $intersect = $this->value;

        /** @var Value $arg */
        foreach (func_get_args() as $arg) {
            /** @var array $convertedArg */
            $convertedArg = $arg->getSet()->getValue();
            //array_values is needed to make sure the indexes are ordered from 0
            $intersect = array_values(array_intersect($intersect, $convertedArg));
        }

        return new self($intersect);
    }
883735
function checkColumns($set = null)
    {
        if ($set !== null) {
            $this->check_columns = $set;
        }

        return $this->check_columns;
    }
605038
public function set($key, $value)
    {
        Assume::that(is_scalar($key));
        if (isset($this->emptySubset)) {
            $this->createTrueSubset();
        }
        $oldValue = null;
        if (isset($this->data[$key])) {
            $oldValue = $this->data[$key];
        }
        if (isset($key) and isset($value) and $key !== '') {
            $this->data[$key] = $value;
        } else {
            $this->data[$key] = null;
        }
        if (! $this->root->updated and $oldValue !== $value) {
            $this->root->updated = true;
            $this->root->update();
        }
    }
1018379
public function getSet($set)
    {
        if (isset($this->sets[$set])) {
            return $this->sets[$set];
        }
        return null;
    }
221972
public function setBool(string $key, $value)
    {
        if (is_string($value)) {
            $value = strtolower($value);
        }
        $this->set($key, in_array($value, [1, true, '1', 'true', 'yes', 'on'], true));
        return $this;
    }
1344385
protected function set($key, $value, bool $variadic = false): bool
    {
        if (null === $key) {
            $this->_values[] = $value;
        } elseif ($variadic) {
            $this->_values[$key] = \array_merge($this->_values[$key], (array) $value);
        } else {
            $this->_values[$key] = $value;
        }

        return !\in_array($value, [true, false, null], true);
    }
249103
function updateStatus($set = null)
    {
        if (empty($set))
        {
            $set = array(
                self::$lastlogin => date('Y-m-d H:i:s'),
                self::$lastip => \Swoole::$php->request->getClientIP()
            );
        }
        return $this->db->update($this->user['id'], $set, $this->login_table);
    }
918412
public boolean remove(Set<?> set, Object object) {
		if (set == null || object == null) {
			return false;
		}
		
		return set.remove(object);
	}
774785
private function isBool(string $key, $value): void
    {
        if (!\is_bool($value) &&
            \in_array($key, [self::CONFIG_KEY_NLP_ENABLED, self::CONFIG_KEY_VERBOSE], true)
        ) {
            throw new InvalidTypeException(sprintf('%s must be a boolean.', $key));
        }
    }
11077
public function set($key, $value)
    {
        $setter = 'set'.ucfirst($key);

        if (is_array($this->current)) {
            $this->current[$key] = $value;
        } elseif ($this->isObjectWithMethod($this->current, $key)) {
            $this->current->$key($value);
        } elseif ($this->isObjectWithMethod($this->current, $setter)) {
            $this->current->$setter($value);
        } elseif ($this->isObjectWithMethod($this->current, 'set')) {
            $this->current->set($key, $value);
        } elseif (is_object($this->current)) {
            $this->current->$key = $value;
        } else {
            return false;
        }

        return true;
    }
886071
private function doSetBinaryBitsetLeInt($bitset): void
    {
        $len = \strlen($bitset);
        $int = 0;
        for ($i = 0; $i < $len; ++$i) {
            $ord = \ord($bitset[$i]);

            if ($ord && $i > \PHP_INT_SIZE - 1) {
                throw new InvalidArgumentException('out-of-range bits detected');
            }

            $int |= $ord << (8 * $i);
        }

        if ($int & (~0 << $this->enumerationCount)) {
            throw new InvalidArgumentException('out-of-range bits detected');
        }

        $this->bitset = $int;
    }
447096
private function _setBool($key, $val) {
		if ($key && !$val) {
			$this->_result = preg_replace("/<if\." . $key . ">(.*?)<\/if\." . $key . ">/s", '', $this->_result);
		}
		$this->_result = str_replace("<if." . $key . ">", '', $this->_result);
		$this->_result = str_replace("</if." . $key . ">", '', $this->_result);
	}
1046313
public function setValue($value)
    {
        // special case for boolean values
        if (is_bool($value)) {
            if ($value) {
                $this->_value = "true";
            } else {
                $this->_value = "false";
            }
        } else {
            $this->_value = (string) $value;
        }
    }
965356
public function open( $set = null )
    {
        return $this->setting(
            'open',
            null === $set ? null : (bool) $set
        );
    }
815617
public function setQuiet($bool)
    {
        $this->quiet = $bool;
        if ($this->quiet) {
            $this->failonerror = false;
        }
    }