@param        $key
@param        $value
@param string $status

@return bool
347452
public function update_option( $key, $value, $status = '' ) {
		$key         = $this->key( $key, true );
		$version_key = $this->get_version_key( $key );
		$_status     = $this->wp_update_option( $key, $value, $status );
		$this->wp_update_option( $version_key, $this->option_version, $status );
		return $_status;
	}
986229
public function setHeader($key, $value = null, $toLower = true)
    {
        if (is_array($key)) {
            foreach ($key as $k => $v) {
                $this->setHeader($k, $v);
            }
        } else {
            if ($toLower === true) {
                $key = strtolower($key);
            }
            if ($value === null) {
                unset($this->_headers[$key]);
            } else {
                $this->_headers[$key] = $value;
            }
        }
    }
638549
public function convertToPHPValue($value, AbstractPlatform $platform): ?Status
    {
        if ($value === null) {
            return null;
        }

        return Status::fromString($value);
    }
298356
public function setnx(string $key, string $value): bool {
		$return_value = false;
		$success      = $this->lock($key, function($handle) use ($value, &$return_value) {
			$old_value = $this->getWithLock($handle);
			if (($old_value === false) && $this->setWithLock($handle, $value, -1)) {
				return $return_value = true;
			}
			else
				return $return_value = false;
		});
		return ($success && $return_value);
	}
1156590
public function first( $key, $value ) {
		$post_ids = $this->find( $key, $value );
		if ( empty( $post_ids ) ) {
			return false;
		}

		return reset( $post_ids );
	}
1033612
public function setStatus($contentId, $version, $status)
    {
        $q = $this->dbHandler->createUpdateQuery();
        $q->update(
            $this->dbHandler->quoteTable('ezcontentobject_version')
        )->set(
            $this->dbHandler->quoteColumn('status'),
            $q->bindValue($status, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('modified'),
            $q->bindValue(time(), null, \PDO::PARAM_INT)
        )->where(
            $q->expr->lAnd(
                $q->expr->eq(
                    $this->dbHandler->quoteColumn('contentobject_id'),
                    $q->bindValue($contentId, null, \PDO::PARAM_INT)
                ),
                $q->expr->eq(
                    $this->dbHandler->quoteColumn('version'),
                    $q->bindValue($version, null, \PDO::PARAM_INT)
                )
            )
        );
        $statement = $q->prepare();
        $statement->execute();

        if ((bool)$statement->rowCount() === false) {
            return false;
        }

        if ($status !== APIVersionInfo::STATUS_PUBLISHED) {
            return true;
        }

        // If the version's status is PUBLISHED, we set the content to published status as well
        $q = $this->dbHandler->createUpdateQuery();
        $q->update(
            $this->dbHandler->quoteTable('ezcontentobject')
        )->set(
            $this->dbHandler->quoteColumn('status'),
            $q->bindValue(ContentInfo::STATUS_PUBLISHED, null, \PDO::PARAM_INT)
        )->set(
            $this->dbHandler->quoteColumn('current_version'),
            $q->bindValue($version, null, \PDO::PARAM_INT)
        )->where(
            $q->expr->eq(
                $this->dbHandler->quoteColumn('id'),
                $q->bindValue($contentId, null, \PDO::PARAM_INT)
            )
        );
        $statement = $q->prepare();
        $statement->execute();

        return (bool)$statement->rowCount();
    }
453652
public function display(string $key, array $data, int $status = RegularResponse::HTTP_OK): ResponseInterface
    {
        $content = $this->templateStrategy->render($key, $data);

        $this->responseStrategy->setContent($content);
        $this->responseStrategy->setStatusCode($status);
        return $this->responseStrategy;
    }
464747
public static function getStatusFromKey($key)
    {
        if (array_key_exists($key, self::$statusList)) {
            return self::$statusList[$key];
        }
        return false;
    }
288648
public function add($key, $value = null, $pop = false)
    {
        return self::addValue($this->data, $key, $value, $pop);
    }
1301012
public function valueSuppliedByUser(bool $status = null) : bool
    {
        $is = false;
        foreach ((array)$this as $field) {
            if (is_string($field)) {
                continue;
            }
            if (isset($status)) {
                $field->getElement()->valueSuppliedByUser($status);
            }
            if ($field->getElement()->valueSuppliedByUser()) {
                $is = true;
            }
        }
        return $is;
    }
109022
public function lPush($key, $value) {
        try {
            $this->_redis->lPush($key, $value);
        } catch (Predis\Response\ServerException $e) {
            throw new CM_Exception_Invalid('Cannot push key to list.', null, ['key' => $key]);
        }
    }
243637
public function redirect($key, $config = [], $statusCode = 302)
    {
        $router = $this->getService('Router');
        $url = $this->getService('Url');
        $urlNew = $url->generate($key, $config);
        $router->redirect($urlNew, $statusCode);
    }
876202
public function setUserState($key, $value)
    {
        $session = JFactory::getSession();
        $registry = $session->get('registry');

        if (!is_null($registry))
        {
            return $registry->set($key, $value);
        }

        return null;
    }
913314
public function setStatus(int $code, string $status)
    {
        return $this
            ->set('code', $code)
            ->setHeader('Status', $status);
    }
121819
protected function _status($id, $status) {
		if (!$this->{$this->modelClass}->changeStatus($id, $status)) {
			return $this->alert('status.fail');
		}
		$this->alert('status.success');
	}
1151431
public static function setState($key, $value)
	{
		$session  = self::$app->get('session');
		$registry = $session->get('registry');

		if (!is_null($registry))
		{
			return $registry->set($key, $value);
		}

		return null;
	}
1091019
public function setStatusCode(int $statusCode, string $statusText = null)
    {
        $this->statusCode = $statusCode;

        if ($statusText === null && isset(ResponseHeaders::$statusTexts[$statusCode])) {
            $this->statusText = ResponseHeaders::$statusTexts[$statusCode];
        } else {
            $this->statusText = $statusText;
        }
    }