Set expunge_method

@param string $expunge_method
@return Site
549149
public function setExpungeMethod($expunge_method)
    {
        $expunge_method = strtoupper($expunge_method);
        if (!isset(self::getExpungeMethods()[$expunge_method])) { 
            throw new \InvalidArgumentException(sprintf('The "%s" expunge method is not a valid expunge method.', $expunge_method));
        }
        $this->expunge_method = $expunge_method;
        return $this;
    }
1147213
public function set($method_or_arg, $method = null)
    {
        $method = is_callable($method_or_arg) ? $method_or_arg : $method;
        $arg = is_callable($method_or_arg) ? null : $method_or_arg;

        $self = $this;

        if ($this->isActive($arg)) {
            $this->app->addHook('post-init', function () use ($method, $self) {
                $page = $self->getPage();
                $page->id = $_GET[$self->name.'_id'];
                $self->app->stickyGET($self->name.'_id');

                try {
                    call_user_func($method, $page, $self);
                } catch (Exception $e) {
                    // post-init cannot catch StopInit
                    if ($e instanceof Exception_StopInit) {
                        return;
                    }
                    throw $e;
                    // exception occured possibly due to a nested page. We
                    // are already executing from post-init, so
                    // it's fine to ignore it.
                }

                //Imants: most likely forgetting is not needed, because we stop execution anyway
                //$self->app->stickyForget($self->name.'_id');
                //$self->app->stickyForget($self->name);
            });
            throw $this->exception('', 'StopInit');
        }

        return $this;
    }
527105
def expunge(self, instance):
        '''
'''
        instance = self.pop(instance)
        instance.session = None
        return instance
53575
public function withCacheExpire(int $cache_expire): SessionMiddleware
    {
        return new SessionMiddleware(
            $this->save_handler,
            $this->name,
            $this->save_path,
            $this->cache_limiter,
            $cache_expire,
            $this->cookie_params
        );
    }
1022850
public function setMethod($method)
    {
        $valid = ['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS', 'TRACE', 'CONNECT'];
        $method = strtoupper($method);

        if (!in_array($method, $valid)) {
            throw new \Exception('Error: That request method is not valid.');
        }
        $this->method = $method;

        return $this;
    }
473732
public static function set($key, $value = null, $expiration = null)
    {
        if (!self::$instance) {
            return null;
        }

        self::$instance->cache->set($key, $value, $expiration);

        return self::$instance;
    }
1101502
public function setMethod($method)
	{
		$method = strtolower($method);

		if (!array_key_exists($method, static::$methods)) {
			throw new \InvalidArgumentException("Method [$method] not a valid HTTP method.");
		}

		if ($this->data && !static::$methods[$method]) {
			throw new \LogicException('Request has POST data, but tried changing HTTP method to one that does not allow POST data');
		}

		$this->method = $method;

		return $this;
	}
577864
public function setExpires($expires)
    {
        if ($expires !== null && !$expires instanceof \DateTime) {
            $expires = new \DateTime('@' . $expires);
        }
        $this->expires = $expires;

        return $this;
    }
992637
public function setMethodPrefix($method, $prefix = '')
    {
        if (is_array($method)) {
            $this->methodPrefix = array_merge($this->methodPrefix, array_change_key_case($method));
        } else {
            $this->methodPrefix[strtolower($method)] = $prefix;
        }

        return $this;
    }
604982
public function phpPhpUnit()
    {
        $this->executeCommandHook(__FUNCTION__, 'before');
        $this->getProjectInstance()
            ->setupPhpUnit()
            ->saveComposer()
            ->updateComposer();
        $this->executeCommandHook(__FUNCTION__, 'after');

        return $this;
    }
345883
public function setMethod( $method, $resetStatus = TRUE ){
		$this->validateMethod( $method );
		if( $this->method !== $method ){
			$this->method	= $method;
			if( $resetStatus )
				$this->status	= self::STATUS_UNKNOWN;
		}
		return $this;
	}
1192294
function restore()
    {
        $Timestamps = $this->CacheFile->processFile( array( $this, 'fetchData' ) );
        if ( $Timestamps === false )
        {
            $errMsg = 'Fatal error - could not restore expiry.php file.';
            eZDebug::writeError( $errMsg, __METHOD__ );
            trigger_error( $errMsg, E_USER_ERROR );
        }

        $this->Timestamps = $Timestamps;
        $this->IsModified = false;
    }
1132501
public function withMethod($method)
    {
        if ($this->getMethod() === $method) {
            return $this;
        }

        $newInstance = clone $this;
        $newInstance->setMethod($method);
        return $newInstance;
    }
1077360
public function setMethod($method)
    {
        $method = strtolower($method);
        if (!in_array($method, ['post', 'get'])) {
            throw new InvalidArgumentException(
                'Method must be "post" or "get"'
            );
        }
        $this->method = $method;

        return $this;
    }
51021
public function setBoleto($expirationDate, $logoUri, array $instructionLines = [])
    {
        $keys = ['first', 'second', 'third'];

        if (empty($instructionLines)) {
            //Avoid warning in array_combine
            $instructionLines = ['', '', ''];
        }

        if ($expirationDate instanceof \DateTime) {
            $expirationDate = $expirationDate->format('Y-m-d');
        }

        $this->data->fundingInstrument->method = self::METHOD_BOLETO;
        $this->data->fundingInstrument->boleto = new stdClass();
        $this->data->fundingInstrument->boleto->expirationDate = $expirationDate;
        $this->data->fundingInstrument->boleto->instructionLines = array_combine($keys, $instructionLines);
        $this->data->fundingInstrument->boleto->logoUri = $logoUri;

        return $this;
    }
1176707
public function setMethod($method)
    {
        // Validate method is string
        if (is_string($method) === false) {
            throw new InvalidArgumentException(
                'Parameter "method" is not a string'
            );
        }

        // Valid method is not blank
        if ($method === '') {
            throw new InvalidArgumentException(
                'Parameter "method" cannot be blank'
            );
        }

        $this->method = $method;

        return $this;
    }
844635
public function setMethod(string $method): void
    {
        if (!\in_array($method, $this->getAvailableMethods(), true)) {
            throw new SessionException(\sprintf('Method unknowed: %s', $method));
        }

        $this->method = $method;
    }