Set a certificate, CSR or CRL Extension

@param string $id
@param mixed $value
@param bool $critical optional
@param bool $replace optional
@access public
@return bool
485370
function setExtension($id, $value, $critical = false, $replace = true)
    {
        return $this->_setExtension($id, $value, $critical, $replace);
    }
424608
public function createExists($id, $value, $ttl = null)
    {
        return $this->create($id, $value, $ttl, true);
    }
316379
public function replace($identifier, $value)
    {
        // store current data to be able to restore on error;
        $oldValue = @$this->registry[$this->section][$identifier];

        parent::replace($identifier, $value);

        $sql = sprintf(
            'UPDATE %s SET `data`=`%s` WHERE `entityId`=`%s`;',
            $this->mysql->quote($this->section),
            $this->mysql->quote($value),
            $this->mysql->quote($identifier)
        );

        $result = $this->mysql->exec($sql);

        if (false === $result) {

            $this->registry[$this->section][$identifier] = $oldValue;

            $this->throwException(
                'Failed to fetch information from the registry: ',
                $this->mysql->errorInfo()
            );
        }
    }
751338
public function where1v1($id, $value)
    {
        list($id_a, $id_b) = explode(',', $id);

        if (($pos = strpos($value, ',')) === false) {
            /** @noinspection CallableParameterUseCaseInTypeContextInspection */
            $value = $this->normalizeValue($id_a, $value);
            $this->_filters[] = ['$or' => [[$id_a => $value], [$id_b => $value]]];
        } else {
            $value_a = $this->normalizeValue($id_a, substr($value, 0, $pos));
            $value_b = $this->normalizeValue($id_b, substr($value, $pos + 1));
            $this->_filters[] = ['$or' => [[$id_a => $value_a, $id_b => $value_b], [$id_a => $value_b, $id_b => $value_a]]];
        }

        return $this;
    }
592429
public function setExtensionNodeId($id, $save = true)
    {
        $source = $this->getSource()->setNodeId($id);

        if ($save)
        {
            $source->save();
        }
    }
495910
public function set_header($name, $value, $replace = true)
	{
		if ($replace)
		{
			$this->headers[$name] = $value;
		}
		else
		{
			$this->headers[] = array($name, $value);
		}

		return $this;
	}
1090323
public function inc($id, $value = 1) {
		$id      = $this->prepareId($id);
		$backend = $this->getBackend();
		
		// Get the counter
		try {
			$result = $backend->get($id);
		}
		catch (PhalconCacheException $exception) {
			if ($this->operationsExceptions) {
				throw new OperationFailed('Incrementing (get) of the data in the cache failed due to the backend exception occurred: "' . $exception->getMessage() . '"', 0, $exception);
			} else {
				return false;
			}
		}
		
		if ($result === null) {
			if ($this->operationsExceptions) {
				throw new OperationFailed('Incrementing (get) of the data in the cache failed, ID: "' . $id . '"');
			} else {
				return false;
			}
		}
		
		// Set the counter
		$newValue = $result + $value;
		
		try {
			$saveResult = $backend->save($id, $newValue);
		}
		catch (PhalconCacheException $exception) {
			if ($this->operationsExceptions) {
				throw new OperationFailed('Incrementing (set) of the data in the cache failed due to the backend exception occurred: "' . $exception->getMessage() . '"', 0, $exception);
			} else {
				return false;
			}
		}
		
		if ($saveResult === false) {
			if ($this->operationsExceptions) {
				throw new OperationFailed('Incrementing (set) of the data in the cache failed, ID: "' . $id . '"');
			} else {
				return false;
			}
		}
		
		return $newValue;
	}
1075865
public function setParameter($key, $value, $replace = true) {
		if(!$replace && isset($this->parameters[$key]))
		{
			$temp = (array)($this->parameters[$key]);
			$temp[] = $value;
			$this->parameters[$key] = $temp;
		}
		else
		{
			$this->parameters[$key] = $value;
		}
	}
978479
public function where1v1($id, $value)
    {
        list($id_a, $id_b) = explode(',', $id);
        if (($pos = strpos($value, ',')) === false) {
            $this->_conditions[] = "$id_a=:$id_a OR $id_b=:$id_b";
            $this->_bind[$id_a] = $value;
            $this->_bind[$id_b] = $value;
        } else {
            $value_a = substr($value, 0, $pos);
            $value_b = substr($value, $pos + 1);

            $this->_conditions[] = "($id_a=:${id_a}_a AND $id_b=:${id_b}_b) OR ($id_a=:${id_a}_b AND $id_b=:${id_b}_a)";
            $this->_bind["${id_a}_a"] = $value_a;
            $this->_bind["${id_b}_b"] = $value_b;
            $this->_bind["${id_a}_b"] = $value_b;
            $this->_bind["${id_b}_a"] = $value_a;
        }

        return $this;
    }
1055309
public static function update_registry( $new_value, $id ) {
		$registry = self::get_registry();
		$registry[ $id ] = $new_value;

		return update_option( self::$registry_option_name, $registry );

	}
711749
public function header($key, $value, $replace = true)
	{
		$this->headers->set($key, $value, $replace);

		return $this;
	}
569086
public function decl($id, $callable)
    {
        if (!is_callable($callable)) {
            throw new \InvalidArgumentException("Passed declaration is not callable");
        }
        $this->set($id, function (Container $c) use($callable, $id) {
            Debug::enterScope(join('.', (array)$id));
            if (null !== ($value = call_user_func($callable, $c))) {
                $c->set($id, $value);
            }
            Debug::exitScope(join('.', (array)$id));
            return $value;
        });
    }
1198009
public function bind($id, $definition = [], $replace = true)
    {
        $container = Container::$instance;
        if (!$replace && $container->has($id)) {
            throw new InvalidParamException("Can not bind service, service '$id' is already exists.");
        }

        if (is_array($definition) && !isset($definition['class'])) {
            throw new InvalidConfigException("The configuration for the \"$id\" service must contain a \"class\" element.");
        }

        $container->setSingleton($id, $definition);
    }
333342
public function bind_if( $id, $value = null, $singleton = false ) {
		if ( ! $this->bound( $id ) ) {
			$this->bind( $id, $value, $singleton );
		}
	}
238337
public function set($id, callable $resolver)
    {
        $this->innerSet($id, $resolver);
        unset($this->resolved[$id]);
        unset($this->singletons[$id]);
        return $this;
    }
132073
public function setItem($id, $value)
    {
        if ($this->locked) {
            return false;
        }

        try {
            if (strpos($id, '.') !== false) {
                eval(
                    '$this->data' .
                    "['" .
                    str_replace('.', "']['", $id) .
                    "']" .
                    '= $value;'
                );
            } else {
                $this->data[$id] = $value;
            }
            return true;
        } catch (Exception $e) {
            return false;
        }
    }
1345134
public function createNotExists($id, $value, $ttl = null)
    {
        return $this->create($id, $value, $ttl, false);
    }